- From: John Boyer <JBoyer@PureEdge.com>
- Date: Thu, 5 Dec 2002 14:54:59 -0800
- To: "Joseph Reagle" <reagle@w3.org>, <w3c-ietf-xmldsig@w3.org>
- Cc: "Max Froumentin" <mf@w3.org>
Hi Joseph,
I should have stated more clearly that the intent was to create a type that could be just like a list of NMTOKENS except for allowing the single extra word #default.
So, I agree that generally allowing the # character to appear would not be what is really needed and looks to be harder to do (e.g. defining the pattern rather than deriving from NMTOKENS).
Also, at first glance, I think your union would allow me to give a list of NMTOKENS or use #default, but not add #default to a list of NMTOKENS.
So, I think we'd have to back up to define a type that unions #default with NCNAME (like NMTOKEN, only more precisely what we need), then make a list of those separable by whitespace.
<attribute name="PrefixList">
<simpleType>
<list>
<union>
<simpleType>
<restriction base='NCNAME'/>
</simpleType>
<simpleType>
<restriction base='string'>
<enumeration value='#default'/>
</restriction>
</simpleType>
</union>
</list>
</simpleType>
</attribute>
OK?
John Boyer, Ph.D.
Senior Product Architect
PureEdge Solutions Inc.
-----Original Message-----
From: Joseph Reagle [mailto:reagle@w3.org]
Sent: Thursday, December 05, 2002 11:30 AM
To: John Boyer; w3c-ietf-xmldsig@w3.org
Cc: Max Froumentin
Subject: Re: Exclusive C14N Error: Using #default in NMTOKENS
On Thursday 05 December 2002 12:36 pm, John Boyer wrote:
> However, the XForms guys immediately wanted to know why we wouldn't
> derive a type from NMTOKENS to describe the content model, so I thought
> I'd put it forward.
With respect to generally enabling the '#' character, I don't think we could
derive from NMTOKENS [2] as I'm not sure how to preclude the occurrence of
a lexical value [2]. We could go back to token [3] and derive from there,
but then we would have to say myNMTOKEN is the whole set in XML1.0 plus the
'#' character. and myNMTOKENS is a a union of myNMTOKEN separated by white
space. I'm not too keen on that.
[1] http://www.w3.org/TR/xmlschema-2/#NMTOKENS
[2] http://www.w3.org/TR/xmlschema-2/#dt-lexical-space
[3] http://www.w3.org/TR/xmlschema-2/#token
With respect to adding our specific '#default' token, I suppose we could
create type PrefixListType as NMTOKENS + '#default'. Something like:
<attribute name="PrefixListType">
<simpleType>
<union>
<simpleType>
<restriction base='NMSTOKENS'/>
</simpleType>
<simpleType>
<restriction base='string'>
<enumeration value='#default'/>
</restriction>
</simpleType>
</union>
</simpleType>
</attribute>
(I have no idea that this works absent testing/playing.) However, I figure
the original creators of NMTOKEN had a good reason for preventing '#' from
appearing there... and what's the benefit?
Received on Thursday, 5 December 2002 17:56:38 UTC