mam sobie taki plik xsd:
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
  3.      <xs:element name="structure">
  4.            <xs:annotation>
  5.                  <xs:appinfo>Niniejszy plik stanowi część systemu zarządzania aplikacja.</xs:appinfo>
  6.                  <xs:documentation>Dokument opisujący strukturę systemu.</xs:documentation>
  7.            </xs:annotation>
  8.            <xs:complexType>
  9.                  <xs:sequence maxOccurs="unbounded">
  10.                        <xs:element name="table">
  11.                              <xs:complexType>
  12.                                    <xs:sequence maxOccurs="unbounded">
  13.                                          <xs:element name="row">
  14.                                                <xs:complexType>
  15.                                                      <xs:sequence maxOccurs="unbounded">
  16.                                                            <xs:element name="column">
  17.                                                                  <xs:complexType>
  18.                                                                        <xs:sequence minOccurs="0" maxOccurs="unbounded">
  19.                                                                              <xs:element name="module">
  20.                                                                                    <xs:complexType>
  21.                                                                                          <xs:sequence minOccurs="0" maxOccurs="unbounded">
  22.                                                                                                <xs:element name="atribute">
  23.                                                                                                      <xs:complexType>
  24.                                                                                                            <xs:attribute name="name" type="xs:string" use="required"/>
  25.                                                                                                      </xs:complexType>
  26.                                                                                                </xs:element>
  27.                                                                                          </xs:sequence>
  28.                                                                                          <xs:attribute name="name" type="xs:string" use="required"/>
  29.                                                                                    </xs:complexType>
  30.                                                                              </xs:element>
  31.                                                                        </xs:sequence>
  32.                                                                        <xs:attribute name="class" type="xs:string" use="optional"/>
  33.                                                                        <xs:attribute name="id" type="xs:string" use="optional"/>
  34.                                                                        <xs:attribute name="rowspan" type="xs:int" use="optional"/>
  35.                                                                        <xs:attribute name="colspan" type="xs:int" use="optional"/>
  36.                                                                  </xs:complexType>
  37.                                                            </xs:element>
  38.                                                      </xs:sequence>
  39.                                                      <xs:attribute name="class" type="xs:string" use="optional"/>
  40.                                                      <xs:attribute name="id" type="xs:string" use="optional"/>
  41.                                                </xs:complexType>
  42.                                          </xs:element>
  43.                                    </xs:sequence>
  44.                                    <xs:attribute name="class" type="xs:string" use="optional"/>
  45.                                    <xs:attribute name="id" type="xs:string" use="optional"/>
  46.                              </xs:complexType>
  47.                        </xs:element>
  48.                  </xs:sequence>
  49.            </xs:complexType>
  50.      </xs:element>
  51. </xs:schema>

pozwala mi on na tworzenie plikow xml w nastepujacej formie:
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <structure xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="E:\xml\schemat.xsd">
  3.      <table class="</span>">
  4.            <row>
  5.                  <column>
  6.                        <<span style='color:blue'>module name="poczta"></module>
  7.                  </column>
  8.                  <column></column>
  9.            </row>
  10.            <row>
  11.                  <column></column>
  12.            </row>
  13.      </table>
  14. </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 questionmark.gif