Lists Home |
Date Index |
Wong Chin Shin wrote:
>Ah, I think I found the answer, but would like to post it up for someone
>more knowledgeable to verify. Would this be correct:
> <xs:extension base="xs:string">
> <xs:attribute name="myattrib1"
> <xs:attribute name="myattrib2"
>type="xs:string" /> </xs:extension>
Actually, you probably don't even need to specify that the element's
content is xs:string.
If there is a chance that myelement will someday contain subelements,
*don't* declare it
a string and simpleContent now. If there is a chance that someday you
will want to refine
the schema further to enforce, say, that myelement has a maximum of 20
characters, then *do*
declare it a string now.