I belive that the XSLT key() function was designed to overcome this
limitation of the XPath id() function. Can the stylesheets be switched
to the key() function?
Gary
Paul Winder wrote:
>
> Hi all,
>
> We are using Xalan 2.1.0 with SAX input from our SGML/XML editor. So far,
> it's working great, but I found a possible limitation today that worries me.
>
> In our editor we can apply links and link targets to an XML Docbook
> document, as <link> tags with href attributes and anchor tags with id
> attributes, respectively. We are processing the document using Norm
> Walsh's XSLDocbook10 (version 1.4) stylesheet. Norm uses the id() function
> to locate the target node for a link.
>
> The problem is that the id() function relies on an ID attribute designated
> in the DTD. Since we are using SAX input, Xalan does not have the DTD, and
> therefore does not have a designated ID attribute, so the id() function
> always comes up with no matches.
>
> Is there any other way to designate the ID attribute to Xalan aside from
> the DTD?
>
> Failing that, is there a way to give Xalan the DTD for the document when
> the input is through SAX? I looked at the LexicalHandler interface, and
> there is mention of sending the "external DTD subset" in a startEntity()
> event using the special name "[dtd]", but it isn't clear to me if this
> would do what I need or how to do it.
>
> Any help would be appreciated.
>
> Paul Winder
> Arbortext