At 05:34 PM 6/19/01 -0400, [EMAIL PROTECTED] wrote:

>Xalan just looks at the incoming attributes and watches for those of type
>ID.  A validating parser should set the right type if it has access to the
>DTD.  If you are manufacturing input, just set the right type when you
>create the attribute.  Xalan does very little -- nothing for you purposes,
>with the DTDHandler.

How about the attributeDecl() method in the DeclHandler interface, which is 
implemented by
SourceTreeHandler--would that do what I need?

If so, what would I specify for the first argument, ename?  Would I have to 
call the function for each
element for which I wanted the attribute recognized as an ID attribute, or 
is there a wildcard value?

Paul

>-scott
>
>
>
>
> 
>
>                     Paul 
> Winder 
>
>                     <pwinder@arbo        To:     [EMAIL PROTECTED] 
 >
>                     rtext.com>           cc:     (bcc: Scott 
> Boag/CAM/Lotus)
>                                          Subject:     Using the id() 
> function with SAX input
>                     06/19/2001 
 >
>                     04:10 
> PM 
>
>                     Please 
 >
>                     respond 
> to 
>
>                     xalan-dev 
 >
> 
>
> 
>
>
>
>
>
>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


Reply via email to