XML could not be parsed - DOCTYPE
Friday, 3 February 2012 · 4 messages · last reply 15 Feb 2012
JL
Johann LEGAYE3 Feb 2012 10:46 #
Hello everyone !
Can someone tell me why BaseX could not parse my xml ?
"ICN-A350-A-291157-A-FAPE3-00015-A-001-01.CGM" in the doctype could not be parsed....
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE dmodule [
<!NOTATION cgm PUBLIC "-//USA-DOD//NOTATION Computer Graphics Metafile//EN">
<!ENTITY ICN-A350-A-291157-A-FAPE3-00015-A-001-01 SYSTEM
"ICN-A350-A-291157-A-FAPE3-00015-A-001-01.CGM" NDATA cgm>
]>
<xmlContent>....
</xmlContent>Thank you !
AH
Alexander Holupirek3 Feb 2012 10:54 #
Hi Johann,
BaseX expects the file 'ICN-A350-A-291157-A-FAPE3-00015-A-001-01.CGM' to be present.
$ basex -itest.xml
Creating Database...
java.io.FileNotFoundException: /private/tmp/ICN-A350-A-291157-A-FAPE3-00015-A-001-01.CGM (No such file or directory) "/private/tmp/test.xml" (Line 4): "ICN-A350-A-291157-A-FAPE3-00015-A-001-01.CGM" could not be parsed. $ touch ICN-A350-A-291157-A-FAPE3-00015-A-001-01.CGM
$ basex -itest.xml
Creating Database...
Indexing Text...
Indexing Attributes...
$
Hope this helps,
Alex
Quoted text · Johann LEGAYE · 27 lines
On 03.02.2012, at 10:46, Johann LEGAYE wrote: > Hello everyone ! > > Can someone tell me why BaseX could not parse my xml ? > > "ICN-A350-A-291157-A-FAPE3-00015-A-001-01.CGM" in the doctype could not be parsed.... > > > <?xml version="1.0" encoding="UTF-8"?> > <!DOCTYPE dmodule [ > <!NOTATION cgm PUBLIC "-//USA-DOD//NOTATION Computer Graphics Metafile//EN"> > <!ENTITY ICN-A350-A-291157-A-FAPE3-00015-A-001-01 SYSTEM "ICN-A350-A-291157-A-FAPE3-00015-A-001-01.CGM" NDATA cgm> > ]> > > <xmlContent> > > .... > > > </xmlContent> > > > Thank you ! > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Alexander Holupirek
|-- http://www.informatik.uni-konstanz.de/~holupire
|-- Database & Information Systems Group, U Konstanz
`-- Room E 221, 0049 7531 88 2188 (phone) 3577 (fax)
AH
Alexander Holupirek3 Feb 2012 11:16 #
Quoted text · Alexander Holupirek · 44 lines
>>> Hello everyone ! >>> >>> Can someone tell me why BaseX could not parse my xml ? >>> >>> "ICN-A350-A-291157-A-FAPE3-00015-A-001-01.CGM" in the doctype could not be parsed.... >>> >>> >>> <?xml version="1.0" encoding="UTF-8"?> >>> <!DOCTYPE dmodule [ >>> <!NOTATION cgm PUBLIC "-//USA-DOD//NOTATION Computer Graphics Metafile//EN"> >>> <!ENTITY ICN-A350-A-291157-A-FAPE3-00015-A-001-01 SYSTEM "ICN-A350-A-291157-A-FAPE3-00015-A-001-01.CGM" NDATA cgm> >>> ]> >>> >>> <xmlContent> >>> >>> .... >>> >>> >>> </xmlContent> >>> >>> >>> Thank you ! >> Hi Johann, >> >> BaseX expects the file 'ICN-A350-A-291157-A-FAPE3-00015-A-001-01.CGM' to be present. >> >> $ basex -itest.xml >> Creating Database... >> java.io.FileNotFoundException: /private/tmp/ICN-A350-A-291157-A-FAPE3-00015-A-001-01.CGM (No such file or directory) >> "/private/tmp/test.xml" (Line 4): "ICN-A350-A-291157-A-FAPE3-00015-A-001-01.CGM" could not be parsed. >> $ touch ICN-A350-A-291157-A-FAPE3-00015-A-001-01.CGM >> $ basex -itest.xml >> Creating Database... >> Indexing Text... >> Indexing Attributes... >> $ >> >> Hope this helps, >> Alex > Thanks for your reply Alexander ! > > Is there a way not to parse the doctype because If I let my .CGM file in my directory, baseX could not parse the .CGM file ? Or is there a way to take into account only xml files when creatinf the database ? > > Thanks again
Hi Johann,
it is related to the parser. Switching the internal parser off helps:
On command line:
$ basex -c 'set intparse false; create database db data.xml' Creating Database...
. 158.93 ms (1108 KB)
Indexing Text...
. 103.98 ms (1457 KB)
Indexing Attributes...
. 102.86 ms (1588 KB)
In GUI:
http://cl.ly/272M3V3g28081y1X2i0d
HTH,
Alex
CG
Hi Johann,
some quick feedback to the mail that was already answered by Alex: I've slightly relaxed the DTD parsing constraints in our internal XML parser. With the latest stable snapshot [1], you'll now be able to browse the discussed XML files without switching to Java's default parser. We'll release an official stability fix (7.1.1) at the end of the week.
Christian
[1] http://files.basex.org/releases/latest/
Quoted text · Johann LEGAYE · 30 lines
On Fri, Feb 3, 2012 at 10:46 AM, Johann LEGAYE <johann.legaye at 4dconcept.fr> wrote: > Hello everyone ! > > Can someone tell me why BaseX could not parse my xml ? > > "ICN-A350-A-291157-A-FAPE3-00015-A-001-01.CGM" in the doctype could not be > parsed.... > > > <?xml version="1.0" encoding="UTF-8"?> > <!DOCTYPE dmodule [ > <!NOTATION cgm PUBLIC "-//USA-DOD//NOTATION Computer Graphics Metafile//EN"> > <!ENTITY ICN-A350-A-291157-A-FAPE3-00015-A-001-01 SYSTEM > "ICN-A350-A-291157-A-FAPE3-00015-A-001-01.CGM" NDATA cgm> > ]> > > <xmlContent> > > .... > > > </xmlContent> > > > Thank you ! > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
Written for BaseX 7.0, 7.1. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery