Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DTD

 
lavanya Ananth
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am new to XML.I have question on DTD's.

<! DOCTYPE myMessage SYSTEM �myDTD.dtd� [
<! ELEMENT myElement ( #PCDATA ) >

] >

The above DOCTYPE contains declarations from myDTD.dtd as well as internal declaration. How will a validating parser check for conformity if both of them(internal and external ) had conflicting declarations . Please clarify.

Thanks in Advance
Lavanya
 
Hari Vignesh Padmanaban
Ranch Hand
Posts: 578
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by lavanya Ananth:
Hi,
I am new to XML.I have question on DTD's.

<! DOCTYPE myMessage SYSTEM �myDTD.dtd� [
<! ELEMENT myElement ( #PCDATA ) >

] >

The above DOCTYPE contains declarations from myDTD.dtd as well as internal declaration. How will a validating parser check for conformity if both of them(internal and external ) had conflicting declarations . Please clarify.

Thanks in Advance
Lavanya


The internal declarations will override the definition in the external DTD

So myElement declared internally will override any myELemnt declared in myDTD.Dtd and the parser should be able to support this. This is the standard way of resolving conflicting declarations

Hope this helps
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic