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

Re: xsl:number on attribute nodes..

Subject: Re: xsl:number on attribute nodes..
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 9 Aug 2005 16:57:58 +0100
xsl num
For once, i think i'd go with xalan here.
(two counts of 1, not one of 11, presumably on a document with one
element node with one attribute?)

You have a count attribute and an (implied) level="single"
so the system should start by going


   "goes up to the first node in the ancestor-or-self axis that matches
   the count pattern"

which in this case will give the element holding the attribute, and
count that.

Note I think the xslt1 spec is badly worded in this case if you use
level="multiple" as it says "followed by the element itself;" implying
that the current node is an element.


Note saxon8 handles your stylesheet differently, running your posted
code on itself produces:


$ saxon num.xsl num.xsl
Error at xsl:number on line 9 of file:/c:/tmp/num.xsl:
  Attribute nodes cannot be numbered
Transformation failed: Run-time errors were reported


$ saxon8 num.xsl num.xsl
Warning: Running an XSLT 1.0 stylesheet with an XSLT 2.0 processor
<?xml version="1.0" encoding="UTF-8"?>1111112111



David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

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.