From hymedia at videotron.ca Tue Jul 4 01:19:21 2006 From: hymedia at videotron.ca (hymedia) Date: Mon, 03 Jul 2006 19:19:21 -0400 Subject: [Expat-discuss] Expat and C++ ? In-Reply-To: Message-ID: <0J1U00FS7OSF8P70@VL-MO-MR004.ip.videotron.ca> Hi all! Anyone have an exemple on how to wrap expat2 in a c++ class witout static or global functions? From ali at mental.com Tue Jul 4 14:02:29 2006 From: ali at mental.com (Albrecht Fritzsche) Date: Tue, 4 Jul 2006 14:02:29 +0200 (MEST) Subject: [Expat-discuss] Expat and C++ ? In-Reply-To: References: Message-ID: On Tue, 4 Jul 2006 expat-discuss-request at libexpat.org wrote: > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 03 Jul 2006 19:19:21 -0400 > From: hymedia > Subject: Re: [Expat-discuss] Expat and C++ ? > To: expat-discuss at libexpat.org > Message-ID: <0J1U00FS7OSF8P70 at VL-MO-MR004.ip.videotron.ca> > Content-Type: text/plain; charset=us-ascii > > Hi all! > > Anyone have an exemple on how to wrap expat2 in a c++ class witout static or > global functions? Maybe something along the following lines... struct Wrapper { XML_Parser m_parser; void init( const XML_Char* encoding, const XML_Char* seperator) { m_parser = XML_ParserCreate_MM( encoding, 0, // memsuite seperator); // namespace seperator if (!m_parser) return; // Set the user data used in callbacks XML_SetUserData(m_parser, (void *) this); } void fini() { if (m_parser) XML_ParserFree(m_parser); m_parser = 0; } bool parse( const char* buffer, int length, bool isFinal) { assert(m_parser != NULL); // get the length if not specified if (length < 0) length = strlen(buffer); // invoke the parser return XML_Parse(m_parser,buffer,length,isFinal)!=0; } ... }; Hope it helps, Ali From hymedia at videotron.ca Tue Jul 4 20:57:10 2006 From: hymedia at videotron.ca (hymedia) Date: Tue, 04 Jul 2006 14:57:10 -0400 Subject: [Expat-discuss] Expat and C++ ? In-Reply-To: Message-ID: <0J1W003TW7BHDUH0@VL-MH-MR001.ip.videotron.ca> The real problem is the C function calls... honestly... have waist enough time wraping Expat from c to c++ and it turns out to be realy ugly... I ll write my own c++ parser... thx anyways -----Original Message----- From: expat-discuss-bounces at libexpat.org [mailto:expat-discuss-bounces at libexpat.org] On Behalf Of Albrecht Fritzsche Sent: Tuesday, July 04, 2006 8:02 AM To: expat-discuss at libexpat.org Subject: Re: [Expat-discuss] Expat and C++ ? On Tue, 4 Jul 2006 expat-discuss-request at libexpat.org wrote: > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 03 Jul 2006 19:19:21 -0400 > From: hymedia > Subject: Re: [Expat-discuss] Expat and C++ ? > To: expat-discuss at libexpat.org > Message-ID: <0J1U00FS7OSF8P70 at VL-MO-MR004.ip.videotron.ca> > Content-Type: text/plain; charset=us-ascii > > Hi all! > > Anyone have an exemple on how to wrap expat2 in a c++ class witout static or > global functions? Maybe something along the following lines... struct Wrapper { XML_Parser m_parser; void init( const XML_Char* encoding, const XML_Char* seperator) { m_parser = XML_ParserCreate_MM( encoding, 0, // memsuite seperator); // namespace seperator if (!m_parser) return; // Set the user data used in callbacks XML_SetUserData(m_parser, (void *) this); } void fini() { if (m_parser) XML_ParserFree(m_parser); m_parser = 0; } bool parse( const char* buffer, int length, bool isFinal) { assert(m_parser != NULL); // get the length if not specified if (length < 0) length = strlen(buffer); // invoke the parser return XML_Parse(m_parser,buffer,length,isFinal)!=0; } ... }; Hope it helps, Ali _______________________________________________ Expat-discuss mailing list Expat-discuss at libexpat.org http://mail.libexpat.org/mailman/listinfo/expat-discuss From fdrake at acm.org Wed Jul 5 08:46:55 2006 From: fdrake at acm.org (Fred L. Drake, Jr.) Date: Wed, 5 Jul 2006 02:46:55 -0400 Subject: [Expat-discuss] Expat and C++ ? In-Reply-To: <0J1W003TW7BHDUH0@VL-MH-MR001.ip.videotron.ca> References: <0J1W003TW7BHDUH0@VL-MH-MR001.ip.videotron.ca> Message-ID: <200607050246.56386.fdrake@acm.org> On Tuesday 04 July 2006 14:57, hymedia wrote: > The real problem is the C function calls... honestly... have waist enough > time wraping Expat from c to c++ and it turns out to be realy ugly... I ll > write my own c++ parser... thx anyways This is really confusing. I know others have written C++ wrappers; are none of those suitable? Though I've not used C++ for many years, I can't imagine that a C++ wrapper library is difficult to write. Applications using the wrapper certainly wouldn't need to deal with C functions. Perhaps it would help if you described what you're having trouble with? -Fred -- Fred L. Drake, Jr. From jez at jezuk.co.uk Wed Jul 5 11:40:44 2006 From: jez at jezuk.co.uk (Jez Higgins) Date: Wed, 05 Jul 2006 10:40:44 +0100 Subject: [Expat-discuss] Expat and C++ ? In-Reply-To: <0J1W003TW7BHDUH0@VL-MH-MR001.ip.videotron.ca> References: <0J1W003TW7BHDUH0@VL-MH-MR001.ip.videotron.ca> Message-ID: <44AB891C.3030808@jezuk.co.uk> hymedia wrote: > The real problem is the C function calls... honestly... have waist enough > time wraping Expat from c to c++ and it turns out to be realy ugly... I ll > write my own c++ parser... thx anyways > The callback functions need to be static and declared as extern "C", in order to have the correct linkage. Getting those to forward on to member functions is pretty straightforward - pass the this pointer to the Expat parser as userData, and you can then use it to forward the call. It took me about a morning's work from a standing start. It's not super-pretty, but there's no way to make it any prettier and I'll take pragmatic over pretty any day. My Arabica package - http://www.jezuk.co.uk/arabica - provides SAX, DOM and XPath layered onto Expat, libxml2, Xerces or MSXML. If it doesn't do what you want, the Expat wrapper should give you a pretty clear steer on what you need - look at saxexpat.h and saxexpat.cpp. Jez -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 250 bytes Desc: OpenPGP digital signature Url : http://mail.libexpat.org/pipermail/expat-discuss/attachments/20060705/963f116e/attachment.pgp From ali at mental.com Wed Jul 5 11:58:47 2006 From: ali at mental.com (Albrecht Fritzsche) Date: Wed, 5 Jul 2006 11:58:47 +0200 (MEST) Subject: [Expat-discuss] Expat and C++ ? In-Reply-To: <0J1W003TW7BHDUH0@VL-MH-MR001.ip.videotron.ca> References: <0J1W003TW7BHDUH0@VL-MH-MR001.ip.videotron.ca> Message-ID: On Tue, 4 Jul 2006, hymedia wrote: > The real problem is the C function calls... honestly... Not sure that I understand you here - expat *is* a lib of C function calls. For convenience you might wrap them in C++ code and hide them from the user but you cannot get rid of them if you want to use expat. > have waist enough > time wraping Expat from c to c++ and it turns out to be realy ugly... I ll > write my own c++ parser... Feel free to do so - if you have time for such things... > thx anyways Cheers Ali From franky.braem at gmail.com Wed Jul 5 20:35:12 2006 From: franky.braem at gmail.com (Franky Braem) Date: Wed, 05 Jul 2006 20:35:12 +0200 Subject: [Expat-discuss] Expat and C++ ? In-Reply-To: References: <0J1W003TW7BHDUH0@VL-MH-MR001.ip.videotron.ca> Message-ID: <44AC0660.50001@gmail.com> Albrecht Fritzsche wrote: > On Tue, 4 Jul 2006, hymedia wrote: > > >> The real problem is the C function calls... honestly... >> > > Not sure that I understand you here - expat *is* a lib of > C function calls. For convenience you might wrap them in > C++ code and hide them from the user but you cannot get rid > of them if you want to use expat. > > >> have waist enough >> time wraping Expat from c to c++ and it turns out to be realy ugly... I ll >> write my own c++ parser... >> > > Feel free to do so - if you have time for such things... > > >> thx anyways >> > > Did you check http://www.codeproject.com/soap/expatimpl.asp ? From tradiaz at yahoo.de Sun Jul 16 01:33:26 2006 From: tradiaz at yahoo.de (andi) Date: Sat, 15 Jul 2006 23:33:26 +0000 Subject: [Expat-discuss] anoying tags in CharacterData Message-ID: <1153006406.9534.5.camel@arch.coffebottle> hi list! when setting a callback with XML_SetCharacterDataHandler(...) it is passed the character data after a tag, but with the other tags. for example: "hello wolrd" not just "hello world" is passed to the callback funtion, but "hello world " is there a way to get rid of this using the expat api? thanks in advance, andi ___________________________________________________________ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de From karl at waclawek.net Sun Jul 16 06:23:08 2006 From: karl at waclawek.net (Karl Waclawek) Date: Sun, 16 Jul 2006 00:23:08 -0400 Subject: [Expat-discuss] anoying tags in CharacterData In-Reply-To: <1153006406.9534.5.camel@arch.coffebottle> References: <1153006406.9534.5.camel@arch.coffebottle> Message-ID: <44B9BF2C.2000008@waclawek.net> andi wrote: > hi list! > when setting a callback with XML_SetCharacterDataHandler(...) it is > passed the character data after a tag, but with the other tags. > for example: > > > "hello wolrd" > > > not just "hello world" is passed to the callback funtion, but > "hello world " > > is there a way to get rid of this using the expat api? This should not happen and I have never seen it happen. Could you post a reproducible example? Karl From greenemk at cox.net Sun Jul 16 14:48:07 2006 From: greenemk at cox.net (Michael Greene) Date: Sun, 16 Jul 2006 08:48:07 -0400 Subject: [Expat-discuss] Open Watcom patch In-Reply-To: <44B9BF2C.2000008@waclawek.net> References: <1153006406.9534.5.camel@arch.coffebottle> <44B9BF2C.2000008@waclawek.net> Message-ID: <44BA3587.1070609@cox.net> Karl, I uploaded files and patch for compiling with OW: [ 1523242 ] Patch to compile EXPAT with Open Watcom 1.5 The expat tests run and pass on OS/2, Win2000/XP, and Linux. Mike From root.admin1 at zg.t-com.hr Fri Jul 21 03:52:56 2006 From: root.admin1 at zg.t-com.hr (Nikola) Date: Fri, 21 Jul 2006 03:52:56 +0200 Subject: [Expat-discuss] Getting xml element data... Message-ID: <44C03378.9010001@zg.t-com.hr> Hello, I am trying to parse simple xml file and process text value in elements (eg. some text). but when my "processText" functions gets called on text element....it also contains ending tag..... How can I get only text....i am sure that library is not designed to return ending tag in text value of xml element. I accept posibility that I am doing soemthing wrong..... Here are the files. Tnx. test.xml ----------------------------------------------------
some data
---------------------------------------------------- with the following code... parse_test.c ---------------------------------------------------- #include #include static int status=0; const char *gname; static void XMLCALL startElement(void *userData, const char *name, const char **atts) { if(!strcmp(name,"data")) status = 1; printf("<%s>\n",name); gname = name; } static void XMLCALL endElement(void *userData, const char *name) { printf("\n",name); } static void XMLCALL processText(void *userData, const char *data, int len) { if(status && !strcmp(gname,"data")){ printf("[%s]",data); status = 0; } } int main(int argc, char *argv[]) { char buf[BUFSIZ]; XML_Parser parser = XML_ParserCreate(NULL); int done=0; int depth = 0; XML_SetUserData(parser, &depth); XML_SetElementHandler(parser, startElement, endElement); XML_SetCharacterDataHandler(parser,processText); FILE *fp; fp = fopen(argv[1],"r"); while(fgets(buf,BUFSIZ,fp)) { if(feof(fp)) done=1; if (XML_Parse(parser, buf, strlen(buf), done) == XML_STATUS_ERROR) { fprintf(stderr, "%s at line %d\n", XML_ErrorString(XML_GetErrorCode(parser)), XML_GetCurrentLineNumber(parser)); return 1; } } fclose(fp); XML_ParserFree(parser); return 0; } ---------------------------------------------------- From jez at jezuk.co.uk Fri Jul 21 11:04:33 2006 From: jez at jezuk.co.uk (Jez Higgins) Date: Fri, 21 Jul 2006 10:04:33 +0100 Subject: [Expat-discuss] Getting xml element data... In-Reply-To: <44C03378.9010001@zg.t-com.hr> References: <44C03378.9010001@zg.t-com.hr> Message-ID: <44C098A1.1060008@jezuk.co.uk> Nikola wrote: > Hello, > > I am trying to parse simple xml file and process text value in elements > (eg. some text). > but when my "processText" functions gets called on text element....it > also contains ending tag..... > > How can I get only text....i am sure that library is not designed to > return ending tag in text value > of xml element. > > I accept posibility that I am doing soemthing wrong..... > You are :) > static void XMLCALL > processText(void *userData, const char *data, int len) > { > > if(status && !strcmp(gname,"data")){ > printf("[%s]",data); > status = 0; > } > } You are treating data as a pointer to a nul-terminated string. It isn't. It points into the buffer expat is parsing. The len parameter tell you the end point of the character data. The text you want is from data to data+len. In the example you've given you could use a loop and putchar to output it. Jez -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 250 bytes Desc: OpenPGP digital signature Url : http://mail.libexpat.org/pipermail/expat-discuss/attachments/20060721/101900e3/attachment.pgp From patos.legit at gmail.com Fri Jul 21 22:47:09 2006 From: patos.legit at gmail.com (Patos) Date: Fri, 21 Jul 2006 16:47:09 -0400 Subject: [Expat-discuss] SAX and children node Message-ID: Hi, I am trying to do a SAX parser on top of expat but I have some problem to figure out if a node have children. Im only able to resolve 2 of the 3 cases so I was wondering if someone could help me. Case 1 : ok with that case. Case 2: thats ok. Case 3 textvalue <--- problem. I dont know how to find out if its a node with children or a node with some text value while im in the StartHandler. There is what im doing : void Reader::OnStartElement(const String &name, const char **atts) { m_Depth++; Element *p = new Element(m_pCurrentReader, name); p->SetDepth(m_Depth); m_pCurrentReader->SetCurrentElement(p); for (int i = 0; atts[i]; i += 2) { p->AddAttribute(new Attribute(String(atts[i]), String(atts[i + 1]))); } m_pCurrentReader->SetNodeComplete(); } void Reader::OnEndElement(const String &name) { Element *p = m_pCurrentReader->GetCurrentElement(); p->SetHasChildren(m_Depth != p->GetDepth()); m_Depth--; m_pCurrentReader->SetNodeComplete(); } Maybe im not doing it the right way and I should try an other approach, plz help me. Patrick From patos.legit at gmail.com Fri Jul 21 23:44:38 2006 From: patos.legit at gmail.com (Patos) Date: Fri, 21 Jul 2006 17:44:38 -0400 Subject: [Expat-discuss] SAX and children node Message-ID: There is a better exemple of what im currently doing : void XMLStartElementHandler(void *data, const char *name, const char **atts) { XmlReader *p = reinterpret_cast(data); XmlNode *xn = p->m_pCurrentReader->m_pCurrentNode; /* default value. */ xn->m_ChildNodes = true; xn->m_Name = String(name); /* retrieve the node attribute. */ for (int i = 0; atts[i]; i += 2) { XmlAttribute *att = new XmlAttribute(String(atts[i]), String(atts[i + 1])); /* add the attribute. */ xn->m_pAttrList->Add(att); } /* node readed. */ p->m_pCurrentReader->m_NodeComplete = true; xn->m_Depth = ++p->m_Depth; } void XMLEndElementHandler(void *data, const char *name) { XmlReader *p = reinterpret_cast(data); XmlNodeReader *xnr = p->m_pCurrentReader; /* do we have child. */ xnr->m_pCurrentNode->m_ChildNodes = p->m_Depth != xnr->m_pCurrentNode->m_Depth; p->m_Depth--; /* were done, get back to the previous depth. */ /* stop the parser. */ xnr->m_NodeComplete = true; } and im calling XML_Parse in a ReadNext method with only 4 bytes at a time looping on the value m_NodeComplete. Patrick From harisridhar at hotmail.com Fri Jul 28 11:58:00 2006 From: harisridhar at hotmail.com (sridhar hari) Date: Fri, 28 Jul 2006 09:58:00 +0000 Subject: [Expat-discuss] How to encode using Expat ? Message-ID: Hi all, I am using Expat parser to parse the xml document, Similarly is there any utility or function to encode the xml message. thanks, Hari! From harisridhar at hotmail.com Fri Jul 28 14:41:17 2006 From: harisridhar at hotmail.com (sridhar hari) Date: Fri, 28 Jul 2006 12:41:17 +0000 Subject: [Expat-discuss] How to encode using Expat ? In-Reply-To: <7C83A8A6B56D3A478333B1DF47E185862CA1B5@MPBABGEX01.corp.mphasis.com> Message-ID: Hi Mukesh, Thanks for ur reply Mukesh... I want the UTF-8 encoding scheme or any standard encoding scheme to be done using the third party (like Expat Library).. Is it possible ? Its should be across platform (rhel,solaris,wince, etc ...) thanks, Hari! >From: "Mukesh S" >To: "sridhar hari" , >Subject: RE: [Expat-discuss] How to encode using Expat ? >Date: Fri, 28 Jul 2006 15:32:48 +0530 > >What kind of encoding u r talking mr.sridhar. cause I have expat for >wince devices, which really works for me. >Even I have done wbxml to xml parser & vice versa xml to wbxml for >windows mobile. > >Regards, >Muki. >India, >Bangalore. >+91-9980142921 (M) > >-----Original Message----- >From: expat-discuss-bounces at libexpat.org >[mailto:expat-discuss-bounces at libexpat.org] On Behalf Of sridhar hari >Sent: Friday, July 28, 2006 3:28 PM >To: expat-discuss at libexpat.org >Subject: [Expat-discuss] How to encode using Expat ? > >Hi all, > >I am using Expat parser to parse the xml document, Similarly is >there any utility or function to encode the xml message. > >thanks, >Hari! > > >_______________________________________________ >Expat-discuss mailing list >Expat-discuss at libexpat.org >http://mail.libexpat.org/mailman/listinfo/expat-discuss From Mukesh.S at mphasis.com Fri Jul 28 12:02:48 2006 From: Mukesh.S at mphasis.com (Mukesh S) Date: Fri, 28 Jul 2006 15:32:48 +0530 Subject: [Expat-discuss] How to encode using Expat ? In-Reply-To: Message-ID: <7C83A8A6B56D3A478333B1DF47E185862CA1B5@MPBABGEX01.corp.mphasis.com> What kind of encoding u r talking mr.sridhar. cause I have expat for wince devices, which really works for me. Even I have done wbxml to xml parser & vice versa xml to wbxml for windows mobile. Regards, Muki. India, Bangalore. +91-9980142921 (M) -----Original Message----- From: expat-discuss-bounces at libexpat.org [mailto:expat-discuss-bounces at libexpat.org] On Behalf Of sridhar hari Sent: Friday, July 28, 2006 3:28 PM To: expat-discuss at libexpat.org Subject: [Expat-discuss] How to encode using Expat ? Hi all, I am using Expat parser to parse the xml document, Similarly is there any utility or function to encode the xml message. thanks, Hari! _______________________________________________ Expat-discuss mailing list Expat-discuss at libexpat.org http://mail.libexpat.org/mailman/listinfo/expat-discuss From Mukesh.S at mphasis.com Sat Jul 29 07:53:38 2006 From: Mukesh.S at mphasis.com (Mukesh S) Date: Sat, 29 Jul 2006 11:23:38 +0530 Subject: [Expat-discuss] How to encode using Expat ? In-Reply-To: Message-ID: <7C83A8A6B56D3A478333B1DF47E185862CA266@MPBABGEX01.corp.mphasis.com> I cannot assure you it is platform indepented, but the coding is done purly in c/c++ & I tested with wince 5.0 devices. And it really works fine for me. My small web-page : http://www.geocities.com/muki_champs Regards, Muki. India, Bangalore. +91-9980142921 (M) -----Original Message----- From: sridhar hari [mailto:harisridhar at hotmail.com] Sent: Friday, July 28, 2006 6:11 PM To: Mukesh S; expat-discuss at libexpat.org Subject: RE: [Expat-discuss] How to encode using Expat ? Hi Mukesh, Thanks for ur reply Mukesh... I want the UTF-8 encoding scheme or any standard encoding scheme to be done using the third party (like Expat Library).. Is it possible ? Its should be across platform (rhel,solaris,wince, etc ...) thanks, Hari! >From: "Mukesh S" >To: "sridhar hari" , >Subject: RE: [Expat-discuss] How to encode using Expat ? >Date: Fri, 28 Jul 2006 15:32:48 +0530 > >What kind of encoding u r talking mr.sridhar. cause I have expat for >wince devices, which really works for me. >Even I have done wbxml to xml parser & vice versa xml to wbxml for >windows mobile. > >Regards, >Muki. >India, >Bangalore. >+91-9980142921 (M) > >-----Original Message----- >From: expat-discuss-bounces at libexpat.org >[mailto:expat-discuss-bounces at libexpat.org] On Behalf Of sridhar hari >Sent: Friday, July 28, 2006 3:28 PM >To: expat-discuss at libexpat.org >Subject: [Expat-discuss] How to encode using Expat ? > >Hi all, > >I am using Expat parser to parse the xml document, Similarly is >there any utility or function to encode the xml message. > >thanks, >Hari! > > >_______________________________________________ >Expat-discuss mailing list >Expat-discuss at libexpat.org >http://mail.libexpat.org/mailman/listinfo/expat-discuss From franky.braem at gmail.com Sat Jul 29 22:17:38 2006 From: franky.braem at gmail.com (Franky Braem) Date: Sat, 29 Jul 2006 22:17:38 +0200 Subject: [Expat-discuss] Expat and JavaScript Message-ID: <44CBC262.8050503@gmail.com> I'm porting expat to JavaScript (using SpiderMonkey, see my wxJS project). The application is in Unicode. I have the following problem: When I pass a normal JavaScript string (SpiderMonkey uses UTF-16) to a 'print' method I don't have to do any conversions to write the data to stdout. When I use a string generated by expat (it is build in UNICODE and creates data in UTF-16) I have to do a conversion before I can send the string to the 'print' method. When I look at the expat string in debug mode, I see all weird Chinese characters. When I debug the normal JavaScript string, I see normal text. Is there a conversion needed between SpiderMonkey and Expat? Maybe this JavaScript code makes some things clearer: p.parse('child', true); if ( p.currentElement.name == "tag1") { wxJS.print("Ok"); } else { wxJS.print("Not ok"); } wxJS.print(p.currentElement.name); The comparison always fails (all though the parsing in expat went fine) Franky. From f.braem at skynet.be Sat Jul 29 22:16:40 2006 From: f.braem at skynet.be (Franky Braem) Date: Sat, 29 Jul 2006 22:16:40 +0200 Subject: [Expat-discuss] Expat and JavaScript encoding Message-ID: <44CBC228.9060904@skynet.be> I'm porting expat to JavaScript (using SpiderMonkey, see my wxJS project). The application is in Unicode. I have the following problem: When I pass a normal JavaScript string (SpiderMonkey uses UTF-16) to a 'print' method I don't have to do any conversions to write the data to stdout. When I use a string generated by expat (it is build in UNICODE and creates data in UTF-16) I have to do a conversion before I can send the string to the 'print' method. When I look at the expat string in debug mode, I see all weird Chinese characters. When I debug the normal JavaScript string, I see normal text. Is there a conversion needed between SpiderMonkey and Expat? Maybe this JavaScript code makes some things clearer: p.parse('child', true); if ( p.currentElement.name == "tag1") { wxJS.print("Ok"); } else { wxJS.print("Not ok"); } wxJS.print(p.currentElement.name); The comparison always fails (all though the parsing in expat went fine) Franky.