[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Parsing & Paths

Subject: Re: Parsing & Paths
From: Jörg Heinicke <joerg.heinicke@xxxxxx>
Date: Sat, 20 Oct 2001 00:23:54 +0200
gml boundingbox
Hi Kris,

at first I want to show you a shorter example of your code:

<FILTERCOORDSYS>
    <xsl:attribute name="id">
        <xsl:value-of select="substring-after(/BoundingBox, '#')" />
    </xsl:attribute>
</FILTERCOORDSYS>

to so called 'attribute value template'

<FILTERCOORDSYS id="{substring-after(/BoundingBox, '#')}"/>

Then you must access the value of the attribute srsName of BoundingBox, not
boundingBox itself:

<FILTERCOORDSYS id="{substring-after(/BoundingBox/@srsName,'#')}"/>

<ENVELOPE minx="{/BoundingBox/gml:coord/gml:x}"
miny="{/BoundingBox/gml:coord/gml:x}"
maxx="{/BoundingBox/gml:coord/gml:x[2]}"
maxy="{/BoundingBox/gml:coord/gml:y[2]}"/>

With <xsl:value-of select=""> (or the attribute value template used above)
you get the value of the first occurence of the XPATH-expression. So you
must not write minx="{/BoundingBox/gml:coord/gml:x[1]}". The [2] (or [1]) is
the same like [position() = 2] and '[]' is a filter for the selected nodes.
So [2] selects the value of the second occurence of the node.

For more information about XSLT and XPATH look at
http://www.zvon.org/xxl/XSLTreference/Output/index.html,
http://www.topxml.com/xsl/xsltref.asp,
http://www.topxml.com/xsl/XPathRef.asp or
http://www.mulberrytech.com/xsl/index.html (links).

Hope this helps,

Joerg


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.