paetje Posted April 10, 2006 Share Posted April 10, 2006 I made an DTD now I my problem that my elements must appear in the order that is set in the DTD. I sepparated the elements with the ",". What must I use to let my elements appear in a different order?Here's my DTD: <!ELEMENT website (titel, pagina) > <!ELEMENT titel (#PCDATA) > <!ELEMENT pagina (paginatitel, content, overig)> <!ELEMENT paginatitel (#PCDATA)> <!ELEMENT content (alinea*)> <!ELEMENT alinea (#PCDATA, nadruk*, tekstlink*, afbeelding*, lijst*, subalinea*)> <!ELEMENT nadruk (#PCDATA)> <!ELEMENT tekstlink (#PCDATA)> <!ELEMENT afbeelding (#PCDATA)> <!ATTLIST afbeelding src CDATA #REQUIRED> <!ATTLIST afbeelding alt CDATA #REQUIRED> <!ATTLIST afbeelding class CDATA #REQUIRED> <!ELEMENT lijst (item+, itemlink*)> <!ELEMENT item (#PCDATA)> <!ELEMENT itemlink (#PCDATA)> <!ELEMENT subalinea (#PCDATA, nadruk*, tekstlink*, afbeelding*, lijst*)> <!ELEMENT overig (links*, objecten*)> <!ELEMENT links (kop, link+)> <!ELEMENT kop (#PCDATA)> <!ELEMENT link (#PCDATA)> <!ELEMENT ojecten (objectnaam)> <!ELEMENT object (#PCDATA)> <!ATTLIST object naam CDATA #REQUIRED> Link to comment Share on other sites More sharing options...
kgw Posted April 17, 2006 Share Posted April 17, 2006 Hi Paetje,As far as I know, elements declared in dtd must follow the order. You can refer to W3Schools DTD tutorialIf you want them to appear in any order, why not write XML Schema? You can use the <all> indicator because it specifies by default that the child elements can appear in any order and that each child element must occur once and only once. You can read W3School XSchema tutorial Link to comment Share on other sites More sharing options...
paetje Posted April 18, 2006 Author Share Posted April 18, 2006 I'm using an DTD becouse the program I work with doesn't support schema . Otherwise I would have used schema. Link to comment Share on other sites More sharing options...
Little Goat Posted April 18, 2006 Share Posted April 18, 2006 I have almost no experience, but tryspaces and see what happens. LG Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now