PMT2010.xsd

Jul 24, 2009 at 8:03 PM

Greetings,

I have downloaden your program and used it to create a c# file.

This works perfectly but it gave some errors.

I was able to fix some errors manually; but with some other bugs I mis some thing.

I have also added the pmt2010.xsd.

 

I hope with this example you can create a better program in the future and prevent these type of errors.

 

Maybe it is very easy for you to fix the problem?

 

If you compile the generated c# file in VS2008 you will see the errors easily.

 

It would be very helpful for me if you could send me a complete c# file with complete (de)serialization of this .xsd file.

 

Btw this/your program is very helpfull and a great addition to the XML programming world.

 

Greetings Peter Bellen     peter.bellen@qsm-europe.com

 

<?xml version="1.0" encoding="utf-8" ?>
<!-- All SeqNumbers are zero based -->
<xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="Document">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="Document-id" type="xs:anyURI" />
        <xs:element name="Floodline" type="xs:float" />
        <xs:element name="CountAccepted" type="xs:boolean" />
        <xs:element minOccurs="0" maxOccurs="unbounded" name="LabelSet">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="SetSeqNumber" type="xs:nonNegativeInteger" />
              <xs:element name="SetName" type="xs:string" />
              <xs:element minOccurs="2" maxOccurs="unbounded" name="SetElement">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="ElementSeqNumber" type="xs:nonNegativeInteger" />
                    <xs:element name="ElementName" type="xs:string" />
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="Text">
          <xs:complexType>
            <xs:sequence>
              <xs:element minOccurs="1" maxOccurs="unbounded" name="Sentence">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="SentenceSeqNumber" type="xs:nonNegativeInteger" />
                    <xs:element name="Text" type="xs:string" />
                    <xs:element name="Functional" type="xs:boolean" />
                    <xs:element name="Watermark" type="xs:float" />
                    <xs:element minOccurs="1" maxOccurs="unbounded" name="Word">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="WordSeqNumber" type="xs:nonNegativeInteger" />
                          <xs:element name="Text" type="xs:string" />
                          <xs:element name="POS-tag" type="xs:string" />
                          <xs:element name="Lemma" type="xs:string" />
                          <xs:element minOccurs="0" maxOccurs="1" name="UserFunction">
                            <xs:complexType>
                              <xs:sequence>
                                <xs:element name="UserName" type="xs:string" />
                                <xs:element name="Type">
                                  <xs:complexType>
                                    <xs:choice>
                                      <xs:element name="LF">
                                        <xs:complexType>
                                          <xs:choice>
                                            <xs:element name="ILF">
                                              <xs:complexType>
                                                <xs:sequence>
                                                  <xs:element name="ISO-LF" type="xs:boolean" />
                                                  <xs:element name="Ratio" type="xs:float" />
                                                </xs:sequence>
                                              </xs:complexType>
                                            </xs:element>
                                            <xs:element name="EIF">
                                              <xs:complexType>
                                                <xs:sequence>
                                                  <xs:element name="ISO-LF" type="xs:boolean" />
                                                  <xs:element name="Ratio" type="xs:float" />
                                                </xs:sequence>
                                              </xs:complexType>
                                            </xs:element>
                                          </xs:choice>
                                        </xs:complexType>
                                      </xs:element>
                                      <xs:element name="TX">
                                        <xs:complexType>
                                          <xs:choice>
                                            <xs:element name="EI">
                                              <xs:complexType>
                                                <xs:sequence>
                                                  <xs:element minOccurs="0" maxOccurs="unbounded" name="LF_ReferencedWordSeqNumber" type="xs:integer" />
                                                </xs:sequence>
                                              </xs:complexType>
                                            </xs:element>
                                            <xs:element name="EO">
                                              <xs:complexType>
                                                <xs:sequence>
                                                  <xs:element minOccurs="0" maxOccurs="unbounded" name="LF_ReferencedWordSeqNumber" type="xs:integer" />
                                                </xs:sequence>
                                              </xs:complexType>
                                            </xs:element>
                                            <xs:element name="EQ">
                                              <xs:complexType>
                                                <xs:sequence>
                                                  <xs:element minOccurs="0" maxOccurs="unbounded" name="LF_ReferencedWordSeqNumber" type="xs:integer" />
                                                </xs:sequence>
                                              </xs:complexType>
                                            </xs:element>
                                          </xs:choice>
                                        </xs:complexType>
                                      </xs:element>
                                    </xs:choice>
                                  </xs:complexType>
                                </xs:element>
                                <xs:element name="Multiplier" type="xs:nonNegativeInteger" />
                                <xs:element name="Accepted" type="xs:boolean" />
                                <xs:element minOccurs="0" maxOccurs="unbounded" name="Note" type="xs:string" />
                                <xs:element minOccurs="0" maxOccurs="unbounded" name="Label">
                                  <xs:complexType>
                                    <xs:sequence>
                                      <xs:element name="SetSeqNumber" type="xs:nonNegativeInteger" />
                                      <xs:element name="ElementSeqNumber" type="xs:nonNegativeInteger" />
                                    </xs:sequence>
                                  </xs:complexType>
                                </xs:element>
                              </xs:sequence>
                            </xs:complexType>
                          </xs:element>
                          <xs:element minOccurs="0" maxOccurs="1" name="ChangeType">
                            <xs:simpleType>
                              <xs:restriction base="xs:string">
                                <xs:enumeration value="ADD" />
                                <xs:enumeration value="CHG" />
                                <xs:enumeration value="DEL" />
                                <xs:enumeration value="NONE" />
                              </xs:restriction>
                            </xs:simpleType>
                          </xs:element>
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="HasNewFunctionality" type="xs:boolean" />
                    <xs:element name="GrossFP" type="xs:nonNegativeInteger" />
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>