REL ASN.1 comments on XML Schema

I've recently submitted several comments to the xml schema comments list
that can address some of the issues that you have raised.    I'm not a W3C
member and have no indication as to the receptiveness of the WG to the
previous comments that I reference.

Case 1: Disjoint values

Though it isn't pretty, use of the multiple patterns and pattern's
referencing types discussed in my comment
http://lists.w3.org/Archives/Public/www-xml-schema-comments/1999OctDec/0039.
html can address disjoint values.

For example,

<datatype name="preTeens">
	<basetype name="integer"/>
	<minInclusive>0</minInclusive>
	<maxInclusive>10</maxInclusive>
</datatype>

<datatype name="twentySomethings">
	<basetype name="integer"/>
	<minInclusive>20</minInclusive>
	<maxInclusive>30</maxInclusive>
</datatype>

<datatype name="noTeensAllowed">
	<basetype name="integer"/>
	<lexical>
		<pattern datatype="preTeens"/>
		<pattern datatype="twentySomethings"/>
	</lexical>
</datatype>
		
2) minLength has been identified in previous comments and anticipate it to
appear in the next public draft.

3) A similar approach to case 1 could be used

<datatype name="zip5">
	<basetype name="string"/>
	<minLength>5</minLength>
	<maxLength>5</maxLength>
</datatype>

<datatype name="zip9">
	<basetype name="string"/>
	<minLength>9</minLength>
	<maxLength>9</maxLength>
</datatype>

<datatype name="zip">
	<basetype name="string"/>
	<minLength>5</minLength>
	<maxLength>9</maxLength>
	<lexical>
		<pattern datatype="zip5"/>
		<pattern datatype="zip9"/>
	</lexical>
</datatype>

Alternatively:

<datatype name="zip">
	<basetype name="string"/>
	<minLength>5</minLength>
	<maxLength>9</maxLength>
	<lexical>
		<pattern>[0..9]{5}</pattern>
		<pattern>[0..9]{9}</pattern>
	</lexical>
</datatype>

4) An exclusion of certain elements from a content model or additional
constraints is a requirement for defining profiles of the schema when an
particular application cannot appropriately handle the information.  The
schema drafts has not addressed and will probably not address the issue of
application profiles.  See xml-dev posting
http://www.lists.ic.ac.uk/hypermail/xml-dev/xml-dev-Nov-1999/0142.html

5) I think it is very bad form for the schema to imply a specific
implementation form for a datatype.  I think it is bad for the schema to say
that I float must be an IEEE double and it would be bad for the schema to
say that a series of boolean values must be implemented as a bit field.  See
http://lists.w3.org/Archives/Public/www-xml-schema-comments/1999OctDec/0024.
html and
http://lists.w3.org/Archives/Public/www-xml-schema-comments/1999JulSep/0052.
html

I think the problem that you have described should be defined as (I'm using
attributes here, but the could as easily be element content)

<element name="KeyUsage">
	<attribute name="DigitalSignature" datatype="boolean"
default="false"/>
	<attribute name="Authentication" datatype="boolean"
default="false"/>
</element>

If a particular application wants to extract the information from

<KeyUsage DigitalSignature="true" Authentication="false"/>

and put it in a bit field fine, but it is also free to create boolean member
variables.

6) I'm not quite sure of the problem that you are trying to pose, so I'll
give my solution to two possible interpretation of the statement.

The first interpretation is that you want a link the document certificate
instead of repeating the value.  The best way to approach that would be to
use traditional XML methods of linking.  For example,

<!--  defines a digital certificate -->
<DigitalCertificate
id="DC">jdhkjhsdfhaskfhakshfkja89t7988754</DigitalCertificate>

<!--  references a digital certificate -->
<DigitalCertificateRef href-="#DC"/>

The second is that you want to retrieve the value of the digital certificate
once and use it repeatedly in later expressions.  XSLT does have the ability
to bind document content with a variable name and then use that variable in
repeated output expressions.

Neither of these interpretations would make any demands on the schema effort
beyond generic support for linking concepts.

Again, as I am not a member of the W3C or the Schema work group, none of
these comments imply any position of either of those organizations.

Received on Thursday, 9 December 1999 12:20:25 UTC