<environment> in 3.1 DTD

James Robertson jwrober at linuxfromscratch.org
Sat Feb 7 19:04:32 PST 2004


Kevin P. Fleming wrote:

> James Robertson wrote:
> 
>> OK.  How do I put that in DTD form?  How about this?
>>
>> <!ELEMENT environment    (variable+)>
>> <!ATTLIST environment
>>           mode           ((append | prepend)?)>
> 
> 
> Unfortunately all I know about DTD syntax is what I've learned from 
> working on the ALFS DTD :-) I don't know whether attributes can be 
> specified like that or not. If they can be that would be useful, there 
> are other places in the DTD where we leave things open ended and it 
> would be nice to be more specific about what's allowed. For example, it 
> would be nice to be able to specify exactly what strings are allowed in 
> <option> instead of just accepting anything.
> 

Got it.  This is the correct syntax:

<!ELEMENT environment    (variable+)>
<!ATTLIST environment
           mode           (append | prepend) #IMPLIED>

-- 
James Robertson -- jwrober at linuxfromscratch dot org
Reg. Linux User -- #160424 -- http://counter.li.org
Reg. LFS User   -- #6981   -- http://www.linuxfromscratch.org
LFS Bugzilla Maintainer    -- http://{blfs-}bugs.linuxfromscratch.org



More information about the alfs-discuss mailing list