You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Loïc Trégan <lt...@hotmail.com> on 2001/03/22 00:15:09 UTC

XGrammarWritter not running in 1.3.1

hello,

[xerces 1.3.1, jdk2]

I simply use XGrammarWriter on the xml file provide in the distrib :

>c:/jdk1.3\bin\java -classpath xerces.jar
org.apache.xerces.domx.XGrammarWriter personal.xml

I get the here-under following error. What's wrong ? If I use xerces.jar
from 1.3.0 there is no problem (except that the restrictions are not well
generated :
<simpleType base="string>
   <enumeration> ...

instead of :
  <simpleType>
    <restriction base="string">
       <enumeration>...
)

thanks for your help.

loic


<?xml version="1.0" encoding="UTF-8"?>
<!-- Grammar referenced in document: "personal.xml" -->
<!DOCTYPE schema PUBLIC "-//W3C//DTD XML Schema Version 1.0//EN"
"http://www.w3.
org/XML/Group/1999/09/23-xmlschema/structures/structures.dtd">
<schema>
  <element name="personnel">
    error: Error parsing document (personal.xml).
java.lang.NullPointerException
        at
org.apache.xerces.dom.DeferredAttrNSImpl.synchronizeData(DeferredAttr
NSImpl.java:160)
        at org.apache.xerces.dom.AttrImpl.getNodeName(AttrImpl.java:259)
        at
org.apache.xerces.dom.AttributeMap.setNamedItem(AttributeMap.java:136
)
        at
org.apache.xerces.dom.DeferredElementNSImpl.synchronizeData(DeferredE
lementNSImpl.java:165)
        at
org.apache.xerces.dom.ElementImpl.getNodeName(ElementImpl.java:142)
        at
org.apache.xerces.domx.XGrammarWriter.printOpenElement(XGrammarWriter
.java:703)
        at
org.apache.xerces.domx.XGrammarWriter.printOpenElement(XGrammarWriter
.java:417)
        at
org.apache.xerces.domx.XGrammarWriter.printElement(XGrammarWriter.jav
a:382)
        at
org.apache.xerces.domx.XGrammarWriter.printElement(XGrammarWriter.jav
a:389)
        at
org.apache.xerces.domx.XGrammarWriter.printElement(XGrammarWriter.jav
a:389)
        at
org.apache.xerces.domx.XGrammarWriter.printGrammar(XGrammarWriter.jav
a:342)
        at
org.apache.xerces.domx.XGrammarWriter.main(XGrammarWriter.java:151)

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


Re: XGrammarWritter not running in 1.3.1

Posted by Andy Clark <an...@apache.org>.
Loïc Trégan wrote:
> I get the here-under following error. What's wrong ? If I use xerces.jar
> from 1.3.0 there is no problem (except that the restrictions are not well

The XGrammarWriter is extremely old code and should not be
expected to work. Unless, of course, you fix it and contribute 
the patch... :)

-- 
Andy Clark * IBM, TRL - Japan * andyc@apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org