anthony1709
Programmer
Hi,
I'm just starting to learn XML, and I have a few questions. I know there are probably stupid and easy questions, but I need help.
Just wondering when writing a XML Schema, how do you write an attribute within a element when element is also a type as well. So here is my element:
<xs:element name="book">
<xs:complexType>
<xs:attribute ref="author"/>
</xs:complexType>
</xs:element>
I was just wondering how do I write the type for the element book, which is a "string"? Or I'm declaring the attribute at the wrong place, as the attribute author is an attribute of book. I hope this all makes sense?
Also got a few other quick questions, how do I make an attribute and element "required", and "implied" in schemas.
Also in DTD, what do the signs "*","+","?", mean?
Thanks very much, I hope some of this makes sense.
I'm just starting to learn XML, and I have a few questions. I know there are probably stupid and easy questions, but I need help.
Just wondering when writing a XML Schema, how do you write an attribute within a element when element is also a type as well. So here is my element:
<xs:element name="book">
<xs:complexType>
<xs:attribute ref="author"/>
</xs:complexType>
</xs:element>
I was just wondering how do I write the type for the element book, which is a "string"? Or I'm declaring the attribute at the wrong place, as the attribute author is an attribute of book. I hope this all makes sense?
Also got a few other quick questions, how do I make an attribute and element "required", and "implied" in schemas.
Also in DTD, what do the signs "*","+","?", mean?
Thanks very much, I hope some of this makes sense.