<?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:element name="structure"> <xs:annotation> <xs:appinfo>Niniejszy plik stanowi część systemu zarządzania aplikacja.</xs:appinfo> <xs:documentation>Dokument opisujący strukturę systemu.</xs:documentation> </xs:annotation> <xs:complexType> <xs:sequence maxOccurs="unbounded"> <xs:element name="table"> <xs:complexType> <xs:sequence maxOccurs="unbounded"> <xs:element name="row"> <xs:complexType> <xs:sequence maxOccurs="unbounded"> <xs:element name="column"> <xs:complexType> <xs:sequence minOccurs="0" maxOccurs="unbounded"> <xs:element name="module"> <xs:complexType> <xs:sequence minOccurs="0" maxOccurs="unbounded"> <xs:element name="atribute"> <xs:complexType> <xs:attribute name="name" type="xs:string" use="required"/> </xs:complexType> </xs:element> </xs:sequence> <xs:attribute name="name" type="xs:string" use="required"/> </xs:complexType> </xs:element> </xs:sequence> <xs:attribute name="class" type="xs:string" use="optional"/> <xs:attribute name="id" type="xs:string" use="optional"/> <xs:attribute name="rowspan" type="xs:int" use="optional"/> <xs:attribute name="colspan" type="xs:int" use="optional"/> </xs:complexType> </xs:element> </xs:sequence> <xs:attribute name="class" type="xs:string" use="optional"/> <xs:attribute name="id" type="xs:string" use="optional"/> </xs:complexType> </xs:element> </xs:sequence> <xs:attribute name="class" type="xs:string" use="optional"/> <xs:attribute name="id" type="xs:string" use="optional"/> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:schema>
pozwala mi on na tworzenie plikow xml w nastepujacej formie:
<?xml version="1.0" encoding="UTF-8"?> <structure xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="E:\xml\schemat.xsd"> <table class="</span>"> <row> <column> <<span style='color:blue'>module name="poczta"></module> </column> <column></column> </row> <row> <column></column> </row> </table> </structure>
tylko teraz mam takie pytanie - co by bylo jakbym chcial zeby pomiedzy tagami <column> a </column> zezwolic na zagniezdzenie jeszcze jednej takie struktory, czyli pomiedzy <column> a </column> wlozyc <table> </table>, z tym ze nie chce tego robic jednopoziomow ale zagniezdzac bez ograniczen - jak moge to osiagnac
