[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: current()/self::* vs "."
At 2007-10-25 17:35 -0600, Alan Stroop wrote:
I've recently run into an issue where the self:: axis abbreviation "." didn't work as expected when trying to apply-templates to the current node. The stylesheet was tested against Saxon8.9b, Xalan-J, Xalan-C and MSXML with Saxon being the only one that didn't have an issue. Saxon is the only one in that list supporting XSLT 2.0 ... that's a clue! Errors returned were syntax errors to could not compile stylesheet. I was able to get the stylesheet to work in all processors by using current() or self::* or self::node() instead of the self:: abbreviation. In XSLT 1.0 "." is not allowed to have predicates, while in XSLT 2.0 "." is allowed to have predicates. Following is a simplified version of the stylesheet and source xml: ... <xsl:apply-templates select=".[not(@alias) or @alias!='true'] " mode="personname" /> ... Can someone fill me in on what I could be missing or why Saxon seems to be the only voice of reason? Running an XSLT 1.0 stylesheet in an XSLT 2.0 processor does not restrict the XPath addresses but it does change some of the return results from using XPath address. I hope this helps. . . . . . . . . . Ken -- Comprehensive in-depth XSLT2/XSL-FO1.1 classes: Austin TX,Jan-2008 World-wide corporate, govt. & user group XML, XSL and UBL training RSS feeds: publicly-available developer resources and training G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) Male Cancer Awareness Jul'07 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|