P
Piper707
Hi,
I'd like to know if there are any more ways of restricting an XML
document to having only non-empty tags (containing Strings).
I can think of 2 ways:
1)
<xs:simpleType name="tagName">
<xs:restriction base="xs:string">
<xs
attern value="([a-zA-Z0-9])+"/>
</xs:restriction>
</xs:simpleType>
2)
<xs:simpleType name="tagName">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
</xs:restriction>
</xs:simpleType>
But approach #2 would allow the user to get away with spaces between
the tags.
Are there any other ways of doing this?
Thanks
Rohit.
I'd like to know if there are any more ways of restricting an XML
document to having only non-empty tags (containing Strings).
I can think of 2 ways:
1)
<xs:simpleType name="tagName">
<xs:restriction base="xs:string">
<xs
</xs:restriction>
</xs:simpleType>
2)
<xs:simpleType name="tagName">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
</xs:restriction>
</xs:simpleType>
But approach #2 would allow the user to get away with spaces between
the tags.
Are there any other ways of doing this?
Thanks
Rohit.