K
Khisrav Kamilov
Hey guys,
I would kindly to ask you to do me a favor by answering and explaining
these terms regarding validation of DTD.
the code of dtd looks like that:
<?xml version="1.0" encoding="UTF-8"?>
<!ELEMENT A (B*,C*)>
<!ELEMENT B (C+,B?)>
<!ATTLIST B K ID #REQUIRED>
<!ELEMENT C (#PCDATA|D|E)*>
<!ELEMENT D (#PCDATA)>
<!ELEMENT E EMPTY>
<!ATTLIST C L IDREF #IMPLIED>
are the below terms valid or not:
1. <A><B K="A1">abc</B><C>cde<D>fgh</D></C></A>
2. <A><B K="A1"><C>abc</C><C>fgh</C></B></A>
3. <A><B K="A1"><C>abc</C></B><C L="A2">def</C></A>
4. <A><C><E/><E></E></C></A>
5. <A><C><E><E/></E></C></A>
6. <A><B K="A1"><C><D>abc</D></C><B K="A2"><C>def</C></B></B></A>
7. <A><B K="A1"><C><D>abc</D></C></B><B K="A2"><C>def</C></B></A>
8. <A><C></C></A>
I have read few times docs about DTD, but some stuff is still not
understandlable for me.
Any answer and explanation would be really appreciated.
Best regards,
Kamilov
I would kindly to ask you to do me a favor by answering and explaining
these terms regarding validation of DTD.
the code of dtd looks like that:
<?xml version="1.0" encoding="UTF-8"?>
<!ELEMENT A (B*,C*)>
<!ELEMENT B (C+,B?)>
<!ATTLIST B K ID #REQUIRED>
<!ELEMENT C (#PCDATA|D|E)*>
<!ELEMENT D (#PCDATA)>
<!ELEMENT E EMPTY>
<!ATTLIST C L IDREF #IMPLIED>
are the below terms valid or not:
1. <A><B K="A1">abc</B><C>cde<D>fgh</D></C></A>
2. <A><B K="A1"><C>abc</C><C>fgh</C></B></A>
3. <A><B K="A1"><C>abc</C></B><C L="A2">def</C></A>
4. <A><C><E/><E></E></C></A>
5. <A><C><E><E/></E></C></A>
6. <A><B K="A1"><C><D>abc</D></C><B K="A2"><C>def</C></B></B></A>
7. <A><B K="A1"><C><D>abc</D></C></B><B K="A2"><C>def</C></B></A>
8. <A><C></C></A>
I have read few times docs about DTD, but some stuff is still not
understandlable for me.
Any answer and explanation would be really appreciated.
Best regards,
Kamilov