Re: DTDs and ANY

I have to give this some more thought, and play around with it, but this
seems like a potential approach to open content models using DTDs.

Forwarded Text ----
 Date: Fri, 14 Apr 2000 16:14:04 +0900
 To: "Joseph M. Reagle Jr." <reagle@w3.org>
 From: "Martin J. Duerst" <duerst@w3.org>
 Subject: Re: DTDs and ANY

 
 At 00/04/13 12:14 -0400, Joseph M. Reagle Jr. wrote:
 >At 10:53 PM 4/13/00 +0900, Martin J. Duerst wrote:
 >  >Joseph - Can you tell me which places in
 >
>http://www.w3.org/TR/2000/WD-xmldsig-core-20000228/xmldsig-core-schema.dtd
 >  >you would like to have ANY? Preferably just by taking the dtd,
 >  >and putting in ANY where you want it, and sending it to me.
 >
 >Presently, we removed the text below and changed ANY to PCDATA. (This
 >actually causes more problems with validators though.) The last version of
 >the spec said:
 >
 >In some cases permitted element content includes user specified and/or
other
 >namespace elements, or these and character content. In this case the ANY
 >declaration is used in the DTD, although strictly speaking this only means
 >any element declared in the DTD.

>http://www.w3.org/Signature/Drafts/WD-xmldsig-core-20000218/Overview.html#se
c
 >-Editorial
 >
 >and it's DTD is
 >

>http://www.w3.org/Signature/Drafts/WD-xmldsig-core-20000218/xmldsig-core-sch
e
 >ma.dtd
 
 The schema has ANY in three places, KeyInfo, Object, and SignatureProperty.
 The schema has other ANYs, so I'm a bit confused.
 
 Basically, what you do is the following. At any place you want to
 have ANY, you put something like:
 
 <!ELEMENT Object %Object.ANY; >
 
 Then *before* that, in the same file, you declare as follows:
 
 <!ENTITY % Object.ANY "EMPTY">
 
 Use EMPTY or whatever appropriate for the 'null' case.
 
 
 Then what a user does to use your DTD is as follows:
 
 First, define Object.ANY the way s/he wants:
 
 <!ENTITY % Object.ANY "( (myObjectA | myObjectB)*)">
 
 to allow myObjectA/B in arbitrary sequence and number,...
 
 Then include the DSig DTD:
 
 <!ENTITY % xmldsig
                PUBLIC "don't know what should go here, but doesn't really 
 matter"
                       "URI of DSIG DTD" >
 %xmldsig;
 
 (sorry, but it takes that much to do an include, first declare and
 then use).
 
 I didn't run this through any software, so it's easily possible
 there are some syntactic mistakes. But with this approach,
 everybody that wants to use DSig in a certain context can rather
 easily do so.
 
 If you have any further questions, please feel free to ask.
 
 
 Regards,    Martin.
 
 
 
End Forwarded Text ----

_________________________________________________________
Joseph Reagle Jr.   
W3C Policy Analyst                mailto:reagle@w3.org
IETF/W3C XML-Signature Co-Chair   http://www.w3.org/People/Reagle/

Received on Tuesday, 18 April 2000 13:36:50 UTC