RE: [xsl] XPath weirdness!!

Subject: RE: [xsl] XPath weirdness!!
From: "Julian Reschke" <julian.reschke@xxxxxx>
Date: Wed, 25 Jul 2001 20:29:05 +0200
I'm not sure what the problem that reported is... But:

*why* are you using the // syntax at all?

"//@y" finds *all* attributes named "y" in the document, and then returns
the text value of the first one (AFAIK). Is this *really* what you want?

If you clearly describe what you source format is and which output you need,
people on the list will be able to suggest much better (and faster) XSLT

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Kris
> Kolodziej
> Sent: Wednesday, July 25, 2001 7:14 PM
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: [xsl] XPath weirdness!!
> This is related to my previous problem with the "&x#3c." So I figured
> out that I was doing something wrong with the XPath locations...However,
> now I am experiencing some weird things with XPath. Take the following
> example for instance:
> This works but it only give me the "x" value (and I sure do want to get
> both x AND y).
> Notice that for "y" I only have "/@y". This is because when I do the
> same thing as I did for "x" (meaning writing   "<xsl:value-of
> select="//@y"/>" )  I get the "&x#3c" error!!! WHY??!
>  <xsl:when test="//SpatialQuery/Buffer">
>           <xsl:for-each select="//Point">
>                 <POINT>
>                 <xsl:attribute name="x">
>                         <xsl:value-of select="//@x"/>
>                 </xsl:attribute>
>                 <xsl:attribute name="y">
>                         <xsl:value-of select="/@y"/>
>                 </xsl:attribute>
>                </POINT>
>         </xsl:for-each>
> It also works when I do the vice versa of what I have ("/@x" and "//@y")
> but I can't have it written the same way.
>  XSL-List info and archive:

 XSL-List info and archive:

Current Thread