Type complexe |
![]() ![]() ![]() |
Déclaration d'un élément book :
<xsd:schema xmls:xsd="http://www.w3.org/2001/XMLSchema" xmls:s='http://www.inria.fr/acacia'> <xsd:element name="book" type="s:bookType"/> |
<!-- Déclaration de son type bookType-->
<xsd:complexType name='bookType'> <xsd:sequence> <xsd:element name='author' type='s:author'/> <xsd:element name='title' type='string'/> <xsd:element name='publisher' type='string'/> <xsd:element name='year' type='integer'/> </xsd:sequence> <xsd:attribute name='id' type='string'/> </xsd:complexType> <xsd:schema> |
Elément book dans un document
<s:book id='...'> <s:author> <s:name>J. M. Keynes</s:name> </s:author> <s:title>General Theory ...</s:title> <s:publisher>...</s:publisher> <s:year>...</s:year> <s:book> |
![]() |
XML/XML Schema 5/3/2004 |
45/86 |