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

Identifier attribute (was: Re: Creating Hierarch

Subject: Identifier attribute (was: Re: Creating Hierarchy)
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Fri, 17 Oct 2008 12:07:06 -0400
 Identifier attribute (was: Re:  Creating Hierarch
At 2008-10-17 11:52 -0400, you wrote:
At 09:18 AM 10/17/2008, Ken wrote:
At 2008-10-17 13:47 +0100, Rowan Sylvester-Bradley wrote:
You'll find a description of an XSLT 2.0 stylesheet that does this (and some
other things besides) at


http://www.idealliance.org/proceedings/xml04/papers/111/mhk-paper.html

Michael Kay
http://www.saxonica.com/

Thanks to Michael and Ken for your replies. I've now got it more or less working using xsl:for-each-group. However, I've got another problem that I can't quite work out. Each of the main elements in the result file needs to have a unique ID attribute.

An ID attribute value must be a name token, so your "1","2",... won't be correct. But you could use something like "N1","N2",...

Of course, the OP hasn't actually said his attributes named "id" need to validate as type ID. (Not that this isn't good advice in general, in case one ever wanted to do that.)

Sure, but I was assuming since he said "ID attribute" and not "identifier attribute" that he was citing ID-ness for the value.


But this brings up another issue we might have brought to the attention of the OP: the name of the attribute.

In all of the XML vocabularies I've designed for clients, standards and myself the last few years I've been avoiding:

id=

in favour of:

xml:id=

ref: http://www.w3.org/TR/2005/REC-xml-id-20050909/

because of the implied semantics.

I haven't run into any hiccoughs in any way by doing so ... has anyone run into roadblocks or unintended consequences doing the same?

. . . . . . . . . . . Ken

--
Upcoming XSLT/XSL-FO hands-on courses:      Wellington, NZ 2009-01
Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video
Video sample lesson:    http://www.youtube.com/watch?v=PrNjJCh7Ppg
Video course overview:  http://www.youtube.com/watch?v=VTiodiij6gE
G. Ken Holman                 mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/s/
Male Cancer Awareness Nov'07  http://www.CraneSoftwrights.com/s/bc
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal

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.