dtd help

James Robertson jwrober at linuxfromscratch.org
Mon Nov 3 19:49:00 PST 2003

I am by no means an XML expert.  Can someone provide a quick intro to 
the DTD for me?  Here are my direct questions:

1.  The entity 'ops' contains the elements: configure, copy, download, 
execute, link, make, mkdir, move, ownership, package, patch, 
permissions, remove, search_replace, stage, textdump, and unpack.  This 
entity is used in the elements alfs and stage. Do these 'ops' elements 
have some special level or purpose over other entities?  If so, I want 
to denote this in the syntax doc.

2. What is the significance of a "*" in an element declaration.  e.g.
<!ELEMENT alfs           ((%ops;)*)>

What about a "?" e.g.
<!ELEMENT download       (file, url*, destination, digest?)>

WHat about a "+" e.g.
<!ELEMENT copy           (option*, source+, destination)>

3. What is an ATTLIST?

4. Inside ATTLIST's we have CDATA and PCDATA entries.  CDATA seems to be 
able to have different stuff behind it.  What does #IMPLIED, #FIXED, 
#REQUIRED?  I think I know, but an official response would be good. 
What is PCDATA?

5. If a given element (a) contains in its definition other elements 
(like copy above), does that mean when you use that element (a) you have 
to have all the other elements in the profile?  e.g. you have to do:

in a profile and if you don't, you'll produce an XML error?


More information about the alfs-discuss mailing list