This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
http://www.w3.org/2010/xslt-xquery-serialization/schema-for-parameters-for-xslt-xquery-serialization.xsd defines <xs:simpleType name="method-type"> <xs:union> <xs:simpleType> <xs:restriction base="xs:string"> <xs:enumeration value="html"/> <xs:enumeration value="text"/> <xs:enumeration value="xml"/> <xs:enumeration value="xhtml"/> </xs:restriction> </xs:simpleType> <xs:simpleType> <xs:restriction base="xs:QName"> <xs:pattern value=".*:.*"/> </xs:restriction> </xs:simpleType> </xs:union> </xs:simpleType> Does this make the following values valid method parameter values: ":" ":my-method" "my-method:" ? Why not having the pattern being: <xs:pattern value=".+:.+"/> ? ".*:.*" is anyway a super-group of the valid QNames. What is actually wanted is: ".+:.+".
I know the final valid type is an intersection of the base type and the pattern in the restriction. Still, ".+:.+" would make the expected value explicit.
I think the pattern as given is actually OK. There are two conditions: it must be a valid QName, and it must contain a colon. The type as defined achieves this. It would be possible to specify a more restrictive pattern such as ".+:.+", but this is unnecessary as this would only exclude strings such as ":" which are not valid QNames in the first place.
(In reply to comment #2) > I think the pattern as given is actually OK. There are two conditions: it must > be a valid QName, and it must contain a colon. The type as defined achieves > this. It would be possible to specify a more restrictive pattern such as > ".+:.+", but this is unnecessary as this would only exclude strings such as ":" > which are not valid QNames in the first place. Yes, I understand that ".*:.*" is the minimum pattern that still enforces the validity of the method-type. If this is the reasoning behind, than this i not an issue anymore. Thanks!