Subject: Only child pattern -- XT bug or my failure?
From: Chris Powell <sooty@xxxxxxxxx>
Date: Wed, 7 Jun 2000 14:37:31 -0400 (EDT)
|
I have some XML that consists of a number of documents -- <DOC> --
containing divisions -- <DIV>. Divisions can contain other divisions, but
I am only concerned with DOC/DIV at this point. Some documents contain a
superfluous single division wrapping all the rest of the content, so I
want to match those DOC/DIVs. Looking at the XSLT recommendation, I see
that the correct match should be DOC/DIV[last()=1]. However, when
documents have multiple divisions (that is, they are correctly marked up
with no superfluous wrapping DIV), the first DIV gets matched and the
template gets applied; siblings get left alone.
I am willing to believe that I am doing something wrong, but don't see
what.
Christina Powell
Coordinator, Humanities Text Initiative
University of Michigan
http://www.hti.umich.edu/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
- parent of child
- Jo Kong HO - Wed, 7 Jun 2000 16:44:35 +0100
- <Possible follow-ups>
- Kay Michael - Wed, 7 Jun 2000 17:17:05 +0100
- Chris Powell - Wed, 7 Jun 2000 14:37:31 -0400 (EDT) <=
|
|