From: Stefanie S. <ste...@gm...> - 2006-11-11 05:34:27
|
Hi, I evaluated the query //person on the input file <a> <person id="person1"> <name>Vidar Reinsch</name> <profile income="91891.75"> <age/> </profile> <watches/> </person> <person id="person2"> <name>Rens Rifaut</name> </person> </a> but as a result I get <person id="person1"> <name>Vidar Reinsch</name> <profile income="91891.75"> <age/> </profile> </person><person/> The result is correct if either the attribute in "profile" or the "age" token are missing. It seems that the end-context for the XPath expression is invoked at both </profile> and </person>. However, I could not find out the reason beyond that. Did anybody else observe this behavior? And if so, how can I fix it? Thanks, Steffi |
From: Makoto O. <oni...@la...> - 2006-11-13 02:09:18
|
Hi Steffi, nice to see you. I run xrun over your XML document and obtained the following result: makoto@clos1:/cygdrive/c/home/makoto:[2]> xrun //person ttt.xml <person id="person1"> <name>Vidar Reinsch</name> <profile income="91891.75"> <age/> </profile> <watches/> </person><person id="person2"> <name>Rens Rifaut</name> </person>makoto@clos1:/cygdrive/c/home/makoto:[3]> This is somewhat different from your result. Did you use a different XPath expression? Only endContext(person) must be emitted if you specify //person. makoto --------------------------------------------------------------- Makoto Onizuka E-mail oni...@la... Open source software computing project, NTT Cyber Space Laboratories From: "Stefanie Scherzinger" <ste...@gm...> Subject: [Xmltk-devs] bug in calling end-Context? Date: Sat, 11 Nov 2006 00:34:20 -0500 Message-ID: <de4...@ma...> >Hi, > >I evaluated the query //person on the input file > > <a> > <person id="person1"> > <name>Vidar Reinsch</name> > <profile income="91891.75"> > <age/> > </profile> > <watches/> > </person> > > <person id="person2"> > <name>Rens Rifaut</name> > </person> ></a> > >but as a result I get > ><person id="person1"> ><name>Vidar Reinsch</name> ><profile income="91891.75"> ><age/> ></profile> ></person><person/> > >The result is correct if either the attribute in "profile" or the >"age" token are missing. It seems that the end-context for the XPath >expression is invoked at both </profile> and </person>. However, I >could not find out the reason beyond that. > >Did anybody else observe this behavior? And if so, how can I fix it? > >Thanks, >Steffi > >------------------------------------------------------------------------- >Using Tomcat but need to do more? Need to support web services, security? >Get stuff done quickly with pre-integrated technology to make your job easier >Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo >http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 >_______________________________________________ >Xmltk-devs mailing list >Xml...@li... >https://lists.sourceforge.net/lists/listinfo/xmltk-devs > > |
From: Makoto O. <oni...@la...> - 2006-11-13 03:17:14
|
Steffi, Sorry to inform you I have the same problem with xmltk1.0.1 that I modified minorly so that it can be compiled on gcc 3.4.2 in linux. I will check to see the xmltk1.0.1. makoto From: "Stefanie Scherzinger" <ste...@gm...> Subject: Re: [Xmltk-devs] bug in calling end-Context? Date: Sun, 12 Nov 2006 21:15:32 -0500 Message-ID: <de4...@ma...> >Hi Makoto, > >thanks for your reply! > >> I run xrun over your XML document and obtained the following >> result: >>>... >> >> This is somewhat different from your result. Did you use >> a different XPath expression? > >I guess there is something wrong with my code then. I had to do many >changes to make it compile for gcc 3.4.6 on RedHat Linux. Maybe I >introduced a bug in doing so. > >Is there a Linux binary available for xrun? > >Steffi > > |
From: Makoto O. <oni...@la...> - 2006-11-13 14:37:44
Attachments:
Automata.h
|
Steffi, I attached Automata.h. Please replace it with yours. I modified State * State::createEdge(LocationStep * sp) in Automata.h. switch(sp->getType()){ case LocationStep::Attribute: // add @* edge to all states edges->push_back(Edge(this, this, Edge::T_AnyAttribute)); // continue; case LocationStep::Element: case LocationStep::Text: case LocationStep::AnyElement: edges->push_back(Edge(this, next, sp)); break; I noticed this problem somewhat before, but I didn't consider this mattered much. makoto From: Makoto ONIZUKA <oni...@la...> Subject: Re: [Xmltk-devs] bug in calling end-Context? Date: Mon, 13 Nov 2006 18:31:12 +0900 (JST) Message-ID: <200...@la...> >Steffi, > >I will send you the fixed version of XMLTK in >a different e-mail. > >makoto > >From: Makoto ONIZUKA <oni...@la...> >Subject: Re: [Xmltk-devs] bug in calling end-Context? >Date: Mon, 13 Nov 2006 12:17:03 +0900 (JST) >Message-ID: <200...@la...> > >>Steffi, >> >>Sorry to inform you I have the same problem with xmltk1.0.1 >>that I modified minorly so that it can be compiled on gcc 3.4.2 >>in linux. >> >>I will check to see the xmltk1.0.1. >> >>makoto >> >> >>From: "Stefanie Scherzinger" <ste...@gm...> >>Subject: Re: [Xmltk-devs] bug in calling end-Context? >>Date: Sun, 12 Nov 2006 21:15:32 -0500 >>Message-ID: <de4...@ma...> >> >>>Hi Makoto, >>> >>>thanks for your reply! >>> >>>> I run xrun over your XML document and obtained the following >>>> result: >>>>>... >>>> >>>> This is somewhat different from your result. Did you use >>>> a different XPath expression? >>> >>>I guess there is something wrong with my code then. I had to do many >>>changes to make it compile for gcc 3.4.6 on RedHat Linux. Maybe I >>>introduced a bug in doing so. >>> >>>Is there a Linux binary available for xrun? >>> >>>Steffi >>> >>> |
From: Stefanie S. <ste...@gm...> - 2006-11-13 18:40:43
|
Hi Maktoto, thank you so much for your help! Steffi |
From: Makoto O. <oni...@la...> - 2006-11-14 07:33:25
Attachments:
Automata.h
|
Steffi, Now, I finished fixing the bug. Again, please replace the Automata.h with the attached one. makoto From: Makoto ONIZUKA <oni...@la...> Subject: Re: [Xmltk-devs] bug in calling end-Context? Date: Mon, 13 Nov 2006 23:37:28 +0900 (JST) Message-ID: <200...@la...> >Steffi, > >I attached Automata.h. Please replace it with yours. >I modified State * State::createEdge(LocationStep * sp) in Automata.h. > > switch(sp->getType()){ > case LocationStep::Attribute: > // add @* edge to all states > edges->push_back(Edge(this, this, Edge::T_AnyAttribute)); > // continue; > case LocationStep::Element: > case LocationStep::Text: > case LocationStep::AnyElement: > edges->push_back(Edge(this, next, sp)); > break; > >I noticed this problem somewhat before, but I didn't consider >this mattered much. > >makoto > > >From: Makoto ONIZUKA <oni...@la...> >Subject: Re: [Xmltk-devs] bug in calling end-Context? >Date: Mon, 13 Nov 2006 18:31:12 +0900 (JST) >Message-ID: <200...@la...> > >>Steffi, >> >>I will send you the fixed version of XMLTK in >>a different e-mail. >> >>makoto >> >>From: Makoto ONIZUKA <oni...@la...> >>Subject: Re: [Xmltk-devs] bug in calling end-Context? >>Date: Mon, 13 Nov 2006 12:17:03 +0900 (JST) >>Message-ID: <200...@la...> >> >>>Steffi, >>> >>>Sorry to inform you I have the same problem with xmltk1.0.1 >>>that I modified minorly so that it can be compiled on gcc 3.4.2 >>>in linux. >>> >>>I will check to see the xmltk1.0.1. >>> >>>makoto >>> >>> >>>From: "Stefanie Scherzinger" <ste...@gm...> >>>Subject: Re: [Xmltk-devs] bug in calling end-Context? >>>Date: Sun, 12 Nov 2006 21:15:32 -0500 >>>Message-ID: <de4...@ma...> >>> >>>>Hi Makoto, >>>> >>>>thanks for your reply! >>>> >>>>> I run xrun over your XML document and obtained the following >>>>> result: >>>>>>... >>>>> >>>>> This is somewhat different from your result. Did you use >>>>> a different XPath expression? >>>> >>>>I guess there is something wrong with my code then. I had to do many >>>>changes to make it compile for gcc 3.4.6 on RedHat Linux. Maybe I >>>>introduced a bug in doing so. >>>> >>>>Is there a Linux binary available for xrun? >>>> >>>>Steffi |
From: Stefanie S. <ste...@gm...> - 2006-11-13 02:15:46
|
Hi Makoto, thanks for your reply! > I run xrun over your XML document and obtained the following > result: >>... > > This is somewhat different from your result. Did you use > a different XPath expression? I guess there is something wrong with my code then. I had to do many changes to make it compile for gcc 3.4.6 on RedHat Linux. Maybe I introduced a bug in doing so. Is there a Linux binary available for xrun? Steffi |
From: Makoto O. <oni...@la...> - 2006-11-13 09:31:29
|
Steffi, I will send you the fixed version of XMLTK in a different e-mail. makoto From: Makoto ONIZUKA <oni...@la...> Subject: Re: [Xmltk-devs] bug in calling end-Context? Date: Mon, 13 Nov 2006 12:17:03 +0900 (JST) Message-ID: <200...@la...> >Steffi, > >Sorry to inform you I have the same problem with xmltk1.0.1 >that I modified minorly so that it can be compiled on gcc 3.4.2 >in linux. > >I will check to see the xmltk1.0.1. > >makoto > > >From: "Stefanie Scherzinger" <ste...@gm...> >Subject: Re: [Xmltk-devs] bug in calling end-Context? >Date: Sun, 12 Nov 2006 21:15:32 -0500 >Message-ID: <de4...@ma...> > >>Hi Makoto, >> >>thanks for your reply! >> >>> I run xrun over your XML document and obtained the following >>> result: >>>>... >>> >>> This is somewhat different from your result. Did you use >>> a different XPath expression? >> >>I guess there is something wrong with my code then. I had to do many >>changes to make it compile for gcc 3.4.6 on RedHat Linux. Maybe I >>introduced a bug in doing so. >> >>Is there a Linux binary available for xrun? >> >>Steffi >> >> |