(1) How can I check the syntax of an attribute? I want to say <call phone="303 444 2501"> check on bn book </call>. Can an attribute be a derived simple type? What is the syntax?
(2) How do I create an element like this <phone loc="home">303 444 2501</phone>?
Here is my attempt:
Why doesn't the latest xerces-J let me put an attribute on a derivation simple type?
<xsd:simpleType name="phone_type">
<xsd:restriction base="xsd:string">
<xsd:pattern value="\p{Nd}{3} \p{Nd}{3} \p{Nd}{4}( x \p{Nd}+)?"/>
</xsd:restriction>
<xsd:attribute name="loc" type="xsd:string" use="optional"/>
</xsd:simpleType>
[Error] phonelog.xsd:37:65: s4s-elt-must-match: The content of 'simpleType' must match (annotation?, (restriction | list | union)).
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
