|
From: Jany Q. <jan...@fr...> - 2003-12-09 09:36:06
|
Hi folks I have asked a pair of questions on the lists and I am getting answers without connection with my question. I guess the question was ill formed. So, here is the problem, and I hope that I make it clear this time. My probleme is that two versions of Openjade behave differently. I noticed the problem first using a customized DTD, but I actually don't have problems with catalogs, http support, customized DTDs or things like that: the problem is that a a root element named html is not processed in the same way by different versions of openjade. Actually, it is not processed in the same way by OpenSP. Here a little example using onsgmls: test.dtd: +++++++++++++++++++++++++++++++++++ <!ELEMENT html (head,body)> <!ELEMENT htmlPL (head,body)> <!ELEMENT head (#PCDATA)*> <!ELEMENT body (#PCDATA)*> =================================== Four xml files using the DTD in the internal or external subset externe.xml: +++++++++++++++++++++++++++++++++++ <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html SYSTEM "test.dtd"> <html> <head>tete</head> <body>corps</body> </html> =================================== interne.xml: +++++++++++++++++++++++++++++++++++ <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html [ <!ELEMENT html (head,body)> <!ELEMENT htmlPL (head,body)> <!ELEMENT head (#PCDATA)*> <!ELEMENT body (#PCDATA)*> ]> <html> <head>tete</head> <body>corps</body> </html> =================================== externePL.xml: +++++++++++++++++++++++++++++++++++ <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE htmlPL SYSTEM "test.dtd"> <htmlPL> <head>tete</head> <body>corps</body> </htmlPL> =================================== internePL.xml: +++++++++++++++++++++++++++++++++++ <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE htmlPL [ <!ELEMENT html (head,body)> <!ELEMENT htmlPL (head,body)> <!ELEMENT head (#PCDATA)*> <!ELEMENT body (#PCDATA)*> ]> <htmlPL> <head>tete</head> <body>corps</body> </htmlPL> =================================== try: The shell used to run nsgmls try. +++++++++++++++++++++++++++++++++++ result=$(uname).err rm -f $result for file in *.xml do onsgmls -v -f error $SGML_BASE_DIR/dcl/xml.dcl $file rc=$? echo " ----------- $file -> $rc ---------" >> $result cat error >> $result rm error done =================================== Linux.err: Test with: "OpenSP" version "1.5pre6" Eror (return code = 1) on externe.xml +++++++++++++++++++++++++++++++++++ ----------- externePL.xml -> 0 --------- ----------- externe.xml -> 1 --------- onsgmls:externe.xml:2:32:E: DTD did not contain element declaration for document type name onsgmls:externe.xml:3:5:E: element "html" undefined onsgmls:externe.xml:4:7:E: element "head" undefined onsgmls:externe.xml:5:7:E: element "body" undefined ----------- internePL.xml -> 0 --------- ----------- interne.xml -> 0 --------- =================================== CYGWIN_NT-5.0.err: Test with: "OpenSP" version "1.3.4" +++++++++++++++++++++++++++++++++++ ----------- externe.xml -> 0 --------- ----------- externePL.xml -> 0 --------- ----------- interne.xml -> 0 --------- ----------- internePL.xml -> 0 --------- =================================== So, my question is: Why is there a difference on the processing of externe.xml, which is the file with an "html" root and which uses the external DTD. Is there an automatic switch to html backend with the new version? Why is onsgmls unable to use the DTD? (notice that there is no catalog, no remote file: the DTD is in the same directory). Jany |