xsl-list
[Top] [All Lists]

Re: [xsl] What's an ID?

2006-09-14 15:19:14
Wolfgang,

The question is excellent.

There is still a DTD-based mechanism for specifying IDs and it still works in systems that support DTDs. (Mike reports this isn't true on .NET.)

There are also those of us who believe that for robust layering, one is well served by establishing the IDness of the ID in the application, as in:

<xsl:key name="byID" match="*[(_at_)id]" use="@id"/>

and using the key() function.

Then an ID can be whatever you define it to be.

Don't forget you can define a key different names for different matches, as in

<xsl:key name="byID" match="*[(_at_)id]" use="@id"/>

<xsl:key name="byID" match="person" use="@pID"/>

etc.

Regards,
Wendell

At 05:01 PM 9/14/2006, you wrote:
Hello,

the id function looks for element nodes with a certain ID value.  But what's
an ID value in XSLT 2.0?  Is it just an attribute of type xsd:ID or a
restricted form of it?  If yes, can't you make use of the id function if
you're using an XSLT processor without Schema support like the open source
version of Saxon?

Best wishes,
Wolfgang

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>