xsl-list
[Top] [All Lists]

RE: [xsl] Axis specifers

2007-01-16 09:30:40
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/


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--