External DTD not working in XML::DOM ! (fwd) 
Author Message
 External DTD not working in XML::DOM ! (fwd)

Quote:
---------- Forwarded message ----------
Date: Fri, 6 Sep 2002 20:06:07 +0530 (IST)


Subject: External DTD not working in XML::DOM !

hi ,

   I m trying to parse an external DTD using XML::DOM(1.36). But my
external DTD is silently skiped off. Does anybody have any clue about this !

bye.
uday.



Wed, 23 Feb 2005 18:01:03 GMT  
 External DTD not working in XML::DOM ! (fwd)

Quote:

> ---------- Forwarded message ----------
> Date: Fri, 6 Sep 2002 20:06:07 +0530 (IST)


> Subject: External DTD not working in XML::DOM !

>    I m trying to parse an external DTD using XML::DOM(1.36). But my
> external DTD is silently skiped off. Does anybody have any clue about this !

There are 2 "kinds" of XML, you want use one kind but you
are using software for the other kind.

"well-formed XML" does not take DTDs (or any other form of
document modeling) into account.

"valid XML" requires that the instance conform to the DTD (or
other model).

You need what is called a "validating XML parser" if you want
to enforce the DTDs/schema model of your documents.

XML::DOM is built on top of XML::DOM::Parser which is built on top
of the "expat" parser.

The expat parser is a non-validating parser:

   http://www.jclark.com/xml/expat.html

i.e. it only processes "well-formed XML".

So XML::DOM is _supposed_ to ignore DTDs.

I usually use a separate validating parser to check the data
before treating it as merely "well-formed" via XML::DOM.

P.S. There is a mailing list just for doing XML stuff using Perl:

     http://listserv.ActiveState.com/mailman/listinfo/perl-xml

--
    Tad McClellan                          SGML consulting

    Fort Worth, Texas



Wed, 23 Feb 2005 23:38:18 GMT  
 External DTD not working in XML::DOM ! (fwd)
On Sat, 7 Sep 2002, Tad McClellan Wrote :

<snip>
tadmc :You need what is called a "validating XML parser" if you want
tadmc :to enforce the DTDs/schema model of your documents.
</snip>

hi ,

Thank u, i think that solved some basic understanding pblm.

But the 'perldoc XML::Parser' says thus:
<snip>
ParseParamEnt
    This is an Expat option. Unless standalone is set
    to "yes" in the XML declaration, setting this to a
    true value allows the external DTD to be read, and
    parameter entities to be parsed and expanded.
</snip>

What does the above mean, Elucidate !

BTW r u aware of any 'validating XML parse'.

TIA.
Bye and take care.
uday.



Mon, 28 Feb 2005 13:10:49 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. DBFViewer 2000 v1.2

2. REQ: Compression algorithms

3. XML::Checker::Parser - using external DTD

4. problems using XML::XPath to parse an XML document that contains a DTD definition (docbook)

5. Option menu - user defined.

6. Automata and Language Theory

7. user defined unit?

8. TURBO PASCAL for Windows - Help Please

9. No Borland searchable database (TResolutionFix: where?)

10. Invalid Date and Time

11. XML::DOM: nicely indented XML?

12. migrating from XML::DOM to XML::XPath

 

 
Powered by phpBB® Forum Software