This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Only child pattern -- XT bug or my failure?


This is repeat of the XT bug discussed a few days ago. 

If you are capable of patching the Java source code, the fix is
simple: In com.jclark.xsl.expr.FilterPattern, in the
getLastPosition() method, change line 64 from

	lastPosition = position;

to

	lastPosition = getPosition();


I reported this problem to James Clark in February; no need to bother
him about it again!

-Ron

-----Original Message-----
From: owner-xsl-list@mulberrytech.com
[mailto:owner-xsl-list@mulberrytech.com]On Behalf Of Chris Powell
Sent: June 7, 2000 11:38
To: 'xsl-list@mulberrytech.com'
Subject: Only child pattern -- XT bug or my failure?



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


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]