I was wondering when it would be the right time to use PCDATA in the DTD. I think there are another two data types? CDATA and ANY?
It says on this website that the difference between the two DATA ones is for parsing and I'm sure sure if in this context that thats what I'd like to do.
This is what I've got at the moment:
Expand|Select|Wrap|Line Numbers
- <?xml version="1.0"?>
- <!DOCTYPE inventory [
- <!ELEMENT inventory (vehicle?)>
- <!ELEMENT vehicle (make, model, km, descr?, photo+)>
- <!ELEMENT make (#PCDATA)>
- <!ELEMENT model (#PCDATA)>
- <!ATTLIST model year ID #REQUIRED>
- <!ELEMENT km (#PCDATA)>
- <!ATTLIST km usagetype (private | business) #REQUIRED>
- <!ELEMENT descr (bodytype, colour)>
- <!ATTLIST vehicle rego ID #REQUIRED>
- ]>
- <inventory>
- <vehicle rego="__">
- <make></make>
- <model year="__"></model>
- <km usagetype="___"></km>
- <descr>
- <bodytype></bodytype>
- <colour></colour>
- </descr>
- <photo></photo>
- </vehicle>
- </inventory>