A few questions about XML Schemas: 1) How do you declare a schema in your xml document? (ie schema equivalent to <!DOCTYPE parent_node SYSTEM "file_name"> ) Are they always internal? 2) How do you use the <choice> element tag?
If you could help me with some of these answers, I'd be grateful. [This message has been edited by Trevor Green (edited July 26, 2001).]
Internal schema is within your xml document <?xml version "1.0"?> <!DOCTYPE parent_node[ ] External schema you make document with .dtd extension <?xml version "1.0"?> <!DOCTYPE parent_node SYSTEM " URL goes here "/nameoffile.dtd"> To declare a public external DTD: <?xml version "1.0"?> <!DOCTYPE parent_node PUBLIC"-//author goes here//DTD name of schema goes here//EN (if it is in english)//" " URL goes here "/nameoffile.dtd">
Okay, I'm still slightly confused. Tom, you said that basically, you treate schemas the same as DTDs. You save the schema as whatever.DTD and link it in with the <!DOCTYPE ...> syntax (as you would a DTD). Ambrose, you said this wasn't correct. However, the syntax you described for namespaces, that's what you put at the top of the schema.xml document what do you put at the top of the original_document.xml to say the external ruleset I'm using is schema.xml (equivalent to <!DOCTYPE blah SYSTEM "document.DTD"> )? Can you have external schemas?
Nothing up my sleeve ... and ... presto! A tiny ad: