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


Subject: preceding-sibling
From: "Kaarle Kaila" <kaarle.kaila@xxxxxx>
Date: Wed, 11 Aug 2004 12:29:32 +0300
xsl preceding sibling
I have tried to understand how the preceding-sibling axes functions but
without success.

I have an xml-file with contents like this:

<section gen="1">
<section gen="2">
<section gen="3">

Here Mary is Johns mother and William is Marys father.

I have as xslt file where I want to connect parent to child like this:

<xsl:stylesheet version = '1.0'

<xsl:template match="table">
<xsl:apply-templates select="section"/>

<xsl:template match="section">
<xsl:if test="position()>1">
Parent:<xsl:value-of select="person"/>, child::<xsl:value-of

What am I doing wrong as the result I get is:
<?xml version="1.0"?>
Parent:Mary, child::.
Parent:William, child::.
I have tried to write the expression with the preceding sibling in may ways
but never get any values from it.

What would be the correct way to use this:

Kaarle Kaila

Current Thread


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.
First Name
Last Name
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.