[email protected]
[Top] [All Lists]

Using LSParser with Local DTD gives exception: Recursive entity referenc

Subject: Using LSParser with Local DTD gives exception: Recursive entity reference "%svg-framework.mod"
From: Rob Davis-5
Date: Wed, 12 Mar 2008 06:13:40 -0700 PDT
I am gettting the following exception attempting to parse an SVG XML document
and use a local copy of the SVG DTD.

org.w3c.dom.ls.LSException: Recursive entity reference "%svg-framework.mod".
(Reference path: %svg-framework.mod -> %svg-framework.mod ->
[Fatal Error] svg11.dtd:73:20: Recursive entity reference
"%svg-framework.mod". (Reference path: %svg-framework.mod ->
%svg-framework.mod -> %svg-framework.mod),
Recursive entity reference "%svg-framework.mod". (Reference path:
%svg-framework.mod -> %svg-framework.mod -> %svg-framework.mod),

Why has it got a problem with this - this is identical to what is on the w3c
site so it should be bugfree.

Why does it think there is recursion and why is that a problem?

Should I be setting a value on the DOMImplementation?

I have downloaded the entire SVG DTD and associated files.

Here is my code:

          LocalDTDResolver  localDTDResolver 
              = new LocalDTDResolver( new File("C:/svgdtd/svg11.dtd") );

     File file = new File("C:\\file.svg");
      URI localFileAsUri = file.toURI();
          DOMImplementationRegistry registry =
                  DOMImplementationRegistry.newInstance( );
          DOMImplementationLS lsImpl =
          LSParser parser =
          // Set options on the parser
          DOMConfiguration config = parser.getDomConfig( );
          config.setParameter("validate", Boolean.TRUE);
          config.setParameter("resource-resolver", localDTDResolver );
          org.w3c.dom.Document doc = 

View this message in context: 
Sent from the Xerces - J - Users mailing list archive at Nabble.com.

To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

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