Hi Jacob,

Jacob Kjome <[EMAIL PROTECTED]> wrote on 04/08/2006 01:32:28 AM:

<snip/>

> Why are the contents expanded?  Why not just give me "%BigEntity;" 
> from the original document?  Is there any recourse?

startParameterEntity() [1] and endParameterEntity() [2] notify you of the 
start and end of a parameter entity. You could just ignore the events in 
between them and write the entity reference instead of its replacement 
text. 
 
> A second problem is that reparsing this file gives me the following 
> parsing error...
> 
> test9.gen.xml:4: Error: White space is required after "<!ENTITY" in 
> the entity declaration.
> 
> The parse error seems to be with the external entity declaration 
> "%BigEntity".  If I change that to "% BigEntity", the parse error 
> goes away.  But, the "name" parameter passed to me in the 
> externalEntityDecl() method is exactly "%BigEntity".  If the parser 
> knows it can't deal with that, why doesn't it pass me "% 
> BigEntity"?  Seems odd that I'd be forced to split the "%" apart from 
> the rest of the entiy name manually.

SAX requires that parameter entities be reported [3] with '%' prepended to 
their names. XNI adopted this naming convention since that's what SAX 
expects.

> thanks,
> 
> Jake
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

[1] 
http://xerces.apache.org/xerces2-j/javadocs/xni/org/apache/xerces/xni/XMLDTDHandler.html#startParameterEntity(java.lang.String
, org.apache.xerces.xni.XMLResourceIdentifier, java.lang.String, 
org.apache.xerces.xni.Augmentations)
[2] 
http://xerces.apache.org/xerces2-j/javadocs/xni/org/apache/xerces/xni/XMLDTDHandler.html#endParameterEntity(java.lang.String
, org.apache.xerces.xni.Augmentations)
[3] 
http://xerces.apache.org/xerces2-j/javadocs/api/org/xml/sax/ext/LexicalHandler.html#startEntity(java.lang.String)

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: [EMAIL PROTECTED]
E-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to