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 ->
%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),
exception
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 =
                  (DOMImplementationLS)registry.getDOMImplementation("LS");
          
          LSParser parser =
                  lsImpl.createLSParser(DOMImplementationLS.MODE_SYNCHRONOUS,
                  null);
          
          // Set options on the parser
          DOMConfiguration config = parser.getDomConfig( );
          config.setParameter("validate", Boolean.TRUE);
          
          
          config.setParameter("resource-resolver", localDTDResolver );
          
          
          org.w3c.dom.Document doc = 
parser.parseURI(localFileAsUri.toString()); 




-- 
View this message in context: 
http://www.nabble.com/Using-LSParser-with-Local-DTD-gives-exception%3A-Recursive-entity-reference-%22-svg-framework.mod%22-tp16002292p16002292.html
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]

Reply via email to