[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: DTD question
Hubert: I'm no XML expert but I believe the following statement goes against what a DTD is supposed to do: >but the order is not important... A DTD's function is to make sure the XML conforms to the specified structure. I'm not certain if your use of the optional '?' operator is correct... ><!ELEMENT adresse ((vorname|nachname|othername),(telefon|fax|strasse|plz |stadt)?)> ...try this <!ELEMENT adresse ((vorname|nachname|othername),telefon?,fax?,strasse?,plz?,stadt?)> ...there are tons of sites out there...here is a searchable list archive... http://lists.xml.org/archives/xml-dev/ HTH, -Will -----Original Message----- From: Hubert Holtz [mailto:Turnhose_alt@xxxxxxx] Sent: Friday, January 24, 2003 1:47 PM To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx Subject: DTD question Hy, I know that this is not a real XSL question, but it's connected with this topic :-) I have an element adress with several elements in it(prename, name, fax, phone,street...) and I want that these elements only may appear once, but the order is not important, and that prename and name have to appear, the rest don't have to but if they appear then just once of course. How do I tell the dtd to do this? I thought of something like this: <!ELEMENT adresse ((vorname|nachname|othername),(telefon|fax|strasse|plz |stadt)?)> <!ELEMENT vorname (#PCDATA)> <!ELEMENT nachname (#PCDATA)> <!ELEMENT othername (#PCDATA)> <!ELEMENT telefon (#PCDATA)> <!ELEMENT fax (#PCDATA)> <!ELEMENT strasse (#PCDATA)> <!ELEMENT plz (#PCDATA)> <!ELEMENT stadt (#PCDATA)> But this doesn't do what it is supposed to do and I know that this is not working correctly because it's false for my needs, but i don't know how to code it right. Any suggestions or tutorial sites which are going a little bit deeper into this topic than the zvon or equal stuff are welcome. Thanks. Homer30 XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|