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

RE: Axis specifers

Subject: RE: Axis specifers
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Tue, 16 Jan 2007 16:30:09 -0000
RE:  Axis specifers
> > Every note in your input has a parent::list so I don't 
> understand why 
> > you are testing this.
> >
> > The way a note is rendered doesn't depend on its position, 
> so I don't 
> > understand why you are testing this either.
> 
> The intention behind this was this. If a 'note' element 
> appeared immediately after the list element, then I needed to 
> display it before the text element. A note element can appear 
> anywhere inside the list element like this for example:
> 
> <list>
>  <note><para>This is the first note.</para></note> 
> <note><para>This is the second note. </para></note> 
> <text><para>This is some text. </para></text> 
> <note><para>This note is after the text. </para></note>  </list>

Then I don't think you understand what "parent" means. All the note elements
in this example are children of the list element: parent::list will return
true for each of them.
> 
> So, only if the <note> element appeared before the text, it 
> will have to be displayed before the text element ...
> If the note element appeared after text, then it is displayed 
> after the text. 

The normal process in XSLT is when you are positioned on a node, to process
its children in document order by calling <xsl:apply-templates/>. This seems
to be exactly what you need to do. You're finding problems where there
aren't any.

Michael Kay
http://www.saxonica.com/

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.