gocomply / xsd2go Goto Github PK
View Code? Open in Web Editor NEWAutomatically generate golang xml parser based on XSD
Home Page: http://isimluk.com/posts/2020/05/xsd2go-automatically-generate-golang-xml-parsers/
License: The Unlicense
Automatically generate golang xml parser based on XSD
Home Page: http://isimluk.com/posts/2020/05/xsd2go-automatically-generate-golang-xml-parsers/
License: The Unlicense
Not able to generate structs from xsd.
$ gocomply_xsd2go convert ~/Downloads/patent-document-v2.5\ 2/patent-document.xsd user.com/private ./go-type-from-xsd
Processing '/Users/mrkashif/Downloads/patent-document-v2.5 2/patent-document.xsd'
Parsing: /Users/mrkashif/Downloads/patent-document-v2.5 2/patent-document.xsd
Parsing: /Users/mrkashif/Downloads/patent-document-v2.5 2/citations.xsd
Parsing: /Users/mrkashif/Downloads/patent-document-v2.5 2/patent-documents.xsd
Parsing: /Users/mrkashif/Downloads/patent-document-v2.5 2/st32-merges.xsd
Parsing: /Users/mrkashif/Downloads/patent-document-v2.5 2/xlink.xsd
Parsing: /Users/mrkashif/Downloads/patent-document-v2.5 2/xml.xsd
panic: Internal error: Unknown xmlns prefix:
goroutine 1 [running]:
github.com/gocomply/xsd2go/pkg/xsd.(*Schema).xmlnsByPrefix(...)
/Users/mrkashif/go/pkg/mod/github.com/gocomply/[email protected]/pkg/xsd/schema.go:104
github.com/gocomply/xsd2go/pkg/xsd.(*Schema).findReferencedSchemaByPrefix(0xc00024c400, 0x0, 0x0, 0x1)
/Users/mrkashif/go/pkg/mod/github.com/gocomply/[email protected]/pkg/xsd/schema.go:98 +0xe9
github.com/gocomply/xsd2go/pkg/xsd.(*Schema).findReferencedElement(0xc00024c400, 0xc000460eb0, 0xf, 0xc0002451a0)
/Users/mrkashif/go/pkg/mod/github.com/gocomply/[email protected]/pkg/xsd/schema.go:71 +0x79
github.com/gocomply/xsd2go/pkg/xsd.(*Element).compile(0xc00046b380, 0xc00024c400, 0xc00046b200)
/Users/mrkashif/go/pkg/mod/github.com/gocomply/[email protected]/pkg/xsd/element.go:145 +0x12d
github.com/gocomply/xsd2go/pkg/xsd.(*Sequence).compile(0xc0004521c0, 0xc00024c400, 0xc00046b200)
/Users/mrkashif/go/pkg/mod/github.com/gocomply/[email protected]/pkg/xsd/sequence.go:21 +0x76
github.com/gocomply/xsd2go/pkg/xsd.(*ComplexType).compile(0xc000468480, 0xc00024c400, 0xc00046b200)
/Users/mrkashif/go/pkg/mod/github.com/gocomply/[email protected]/pkg/xsd/types.go:69 +0x411
github.com/gocomply/xsd2go/pkg/xsd.(*Element).compile(0xc00046b200, 0xc00024c400, 0x0)
/Users/mrkashif/go/pkg/mod/github.com/gocomply/[email protected]/pkg/xsd/element.go:130 +0xb3
github.com/gocomply/xsd2go/pkg/xsd.(*Schema).compile(0xc00024c400)
/Users/mrkashif/go/pkg/mod/github.com/gocomply/[email protected]/pkg/xsd/schema.go:50 +0x59
github.com/gocomply/xsd2go/pkg/xsd.(*Workspace).loadXsd(0xc0000a31c0, 0xc00026c050, 0x45, 0x0, 0x0, 0x0)
/Users/mrkashif/go/pkg/mod/github.com/gocomply/[email protected]/pkg/xsd/workspace.go:51 +0x394
github.com/gocomply/xsd2go/pkg/xsd.(*Import).load(0xc0000af560, 0xc0000a31c0, 0xc0000aa8c0, 0x30, 0xc000408090, 0x0)
/Users/mrkashif/go/pkg/mod/github.com/gocomply/[email protected]/pkg/xsd/schema.go:256 +0xbe
github.com/gocomply/xsd2go/pkg/xsd.(*Workspace).loadXsd(0xc0000a31c0, 0xc0000aa8c0, 0x3e, 0x0, 0x0, 0x0)
/Users/mrkashif/go/pkg/mod/github.com/gocomply/[email protected]/pkg/xsd/workspace.go:47 +0x32e
github.com/gocomply/xsd2go/pkg/xsd.(*Import).load(0xc0000af0e0, 0xc0000a31c0, 0x7ffeefbff6d0, 0x30, 0xc000408088, 0x0)
/Users/mrkashif/go/pkg/mod/github.com/gocomply/[email protected]/pkg/xsd/schema.go:256 +0xbe
github.com/gocomply/xsd2go/pkg/xsd.(*Workspace).loadXsd(0xc0000a31c0, 0x7ffeefbff6d0, 0x44, 0x0, 0x0, 0x0)
/Users/mrkashif/go/pkg/mod/github.com/gocomply/[email protected]/pkg/xsd/workspace.go:47 +0x32e
github.com/gocomply/xsd2go/pkg/xsd.NewWorkspace(0xc0000c0570, 0x23, 0x7ffeefbff6d0, 0x44, 0x2, 0xc0000c0570, 0x23)
/Users/mrkashif/go/pkg/mod/github.com/gocomply/[email protected]/pkg/xsd/workspace.go:20 +0x8b
github.com/gocomply/xsd2go/pkg/xsd2go.Convert(0x7ffeefbff6d0, 0x44, 0x7ffeefbff715, 0x10, 0x7ffeefbff726, 0x12, 0xc0000bb748, 0x141e960)
/Users/mrkashif/go/pkg/mod/github.com/gocomply/[email protected]/pkg/xsd2go/generate.go:12 +0x197
github.com/gocomply/xsd2go/cli/cmd.glob..func2(0xc0000ccdc0, 0x0, 0xc0000b9020)
/Users/mrkashif/go/pkg/mod/github.com/gocomply/[email protected]/cli/cmd/cmd.go:33 +0x85
github.com/urfave/cli.HandleAction(0x13475a0, 0x13cb400, 0xc0000ccdc0, 0xc0000ccdc0, 0x0)
/Users/mrkashif/go/pkg/mod/github.com/urfave/[email protected]/app.go:526 +0xfd
github.com/urfave/cli.Command.Run(0x13af1cb, 0x7, 0x0, 0x0, 0x0, 0x0, 0x0, 0x13c29c9, 0x44, 0x0, ...)
/Users/mrkashif/go/pkg/mod/github.com/urfave/[email protected]/command.go:174 +0x58e
github.com/urfave/cli.(*App).Run(0xc0000c8700, 0xc000136000, 0x5, 0x5, 0x0, 0x0)
/Users/mrkashif/go/pkg/mod/github.com/urfave/[email protected]/app.go:279 +0x7e8
github.com/gocomply/xsd2go/cli/cmd.Execute(0xffffffff, 0xc00010e058)
/Users/mrkashif/go/pkg/mod/github.com/gocomply/[email protected]/cli/cmd/cmd.go:18 +0x113
main.main()
/Users/mrkashif/go/pkg/mod/github.com/gocomply/[email protected]/cli/gocomply_xsd2go/main.go:8 +0x25
patent-document.xsd
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" xmlns:cit="http://alexandria.fairviewresearch.com/ns/cit/" xmlns:st32="http://alexandria.fairviewresearch.com/ns/st32/" xmlns:xlink="http://www.w3.org/1999/xlink">
<xs:include schemaLocation="ext-dependencies.xsd"/>
<xs:include schemaLocation="ifi-integrated-content.xsd"/>
<xs:include schemaLocation="ifi-annotated-data.xsd"/>
<xs:include schemaLocation="autags.xsd"/>
<xs:import namespace="http://alexandria.fairviewresearch.com/ns/cit/" schemaLocation="citations.xsd"/>
<xs:import namespace="http://alexandria.fairviewresearch.com/ns/st32/" schemaLocation="st32-merges.xsd"/>
<!-- <xs:import namespace="http://www.w3.org/1999/xlink" schemaLocation="xlink.xsd"/> -->
<!-- <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd"/> -->
<xs:attributeGroup name="dfltattrs">
<xs:attribute name="id" type="xs:ID"/>
<!-- <xs:attribute name="mxw-id"/> -->
<xs:attribute name="status" default="new">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="n"/>
<xs:enumeration value="new"/>
<xs:enumeration value="c"/>
<xs:enumeration value="corrected"/>
<xs:enumeration value="d"/>
<xs:enumeration value="deleted"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<!-- <xs:attribute name="load-source"/> -->
<!-- <xs:attribute name="ref-ucid"/> -->
<!-- <xs:attribute name="copyright-ref"/> -->
</xs:attributeGroup>
<!-- The contents of a paragraph or other block-level text element -->
<xs:group name="ptext">
<xs:sequence>
<xs:choice minOccurs="0">
<xs:element ref="b"/>
<xs:element ref="i"/>
<xs:element ref="u"/>
<xs:element ref="o"/>
<xs:element ref="sub"/>
<xs:element ref="sup"/>
<xs:element ref="smallcaps"/>
<xs:element ref="br"/>
<xs:element ref="pre"/>
<xs:element ref="dl"/>
<xs:element ref="ul"/>
<xs:element ref="ol"/>
<xs:element ref="sl"/>
<xs:element ref="crossref"/>
<xs:element ref="figref"/>
<xs:group ref="cit:patcit"/>
<xs:group ref="cit:nplcit"/>
<xs:element ref="bio-deposit"/>
<xs:element ref="img"/>
<xs:element ref="imgref"/>
<xs:element ref="chemistry"/>
<xs:element ref="maths"/>
<xs:element ref="tables"/>
<xs:element ref="table-external-doc"/>
<xs:element ref="sequence-cwu"/>
</xs:choice>
</xs:sequence>
</xs:group>
<!-- The contents of headings or other block-level elements -->
<xs:group name="btext">
<xs:sequence>
<xs:choice minOccurs="0">
<xs:element ref="img"/>
<xs:element ref="imgref"/>
<xs:element ref="b"/>
<xs:element ref="i"/>
<xs:element ref="u"/>
<xs:element ref="o"/>
<xs:element ref="sub"/>
<xs:element ref="sup"/>
<xs:element ref="smallcaps"/>
</xs:choice>
</xs:sequence>
</xs:group>
<xs:group name="nam">
<xs:sequence>
<xs:choice>
<xs:element ref="name"/>
<xs:sequence>
<xs:element minOccurs="0" ref="prefix"/>
<xs:choice>
<xs:element ref="last-name"/>
<xs:element ref="orgname"/>
</xs:choice>
<xs:element minOccurs="0" ref="first-name"/>
<xs:element minOccurs="0" ref="middle-name"/>
<xs:element minOccurs="0" ref="suffix"/>
<xs:element minOccurs="0" ref="iid"/>
<xs:element minOccurs="0" ref="role"/>
<xs:element minOccurs="0" ref="orgname"/>
<xs:element minOccurs="0" ref="department"/>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="synonym"/>
</xs:sequence>
</xs:choice>
<xs:element minOccurs="0" ref="registered-number"/>
</xs:sequence>
</xs:group>
<!--
External dependenies
These include Table and Math markup and all character references.
-->
<!-- The ST32 MATH and CHEM definitions -->
<!-- Namespaces and elements defined above in st32-merges.dtd -->
<xs:element name="st32math" abstract="true"/>
<xs:element name="st32chem" abstract="true"/>
<!-- The IFI integrated content definitions -->
<!-- The IFI annotated data definitions -->
<!-- AU register content definitions -->
<!-- Content definitions for all elements related to citations -->
<xs:element name="patent-document">
<xs:complexType>
<xs:choice>
<xs:element maxOccurs="unbounded" ref="doc-page"/>
<xs:sequence>
<xs:element ref="bibliographic-data"/>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="abstract"/>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="description"/>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="claims"/>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="amended-claims"/>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="amended-claims-statement"/>
<xs:element minOccurs="0" ref="drawings"/>
<xs:element minOccurs="0" ref="attachments-external"/>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="search-report-data"/>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="keywords"/>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="legal-status"/>
<xs:element minOccurs="0" ref="extended-patent-family"/>
<xs:element minOccurs="0" ref="revision-history"/>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="copyright"/>
</xs:sequence>
</xs:choice>
<xs:attributeGroup ref="dfltattrs"/>
<xs:attribute name="ucid" use="required"/>
<xs:attribute name="file"/>
<xs:attribute name="lang"/>
<xs:attribute name="country" use="required"/>
<xs:attribute name="doc-number" use="required"/>
<xs:attribute name="kind"/>
<xs:attribute name="date"/>
<xs:attribute name="date-produced"/>
<xs:attribute name="file-reference-id"/>
<xs:attribute name="withdrawn">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="yes"/>
<xs:enumeration value="no"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="family-id"/>
</xs:complexType>
</xs:element>
<!--
@ucid: unique identifier
@file: internal (used by data provider)
@lang: language of publication
@country: originating office
@doc-number: document publication number
@kind: document kind code
@date: date of publication
@date-produced: internal (used by data provider)
@family-id: DOCDB family identifer (use for grouping simple families)
@file-reference-id: internal (used by data provider)
@withdrawn: withdrawn status of document (yes is only value used)
@family-id: DOCDB-provided indicator of family relationship. Integer value
used to group members of a simple family
-->
<!--
Used in EP/WO data for search-report section. WO also uses
this element for references in the description and (amended) claims
section of the document.
@he: height
@wi: width
@type: image foramt
@alt: descriptive text
@pp: page range
@ppf: first page
@ppl: last page
@file: relative location of external file
@color: color or black and white page
NOTE: some US plant patents are color images
@orientation: layout of page
-->
<xs:element name="doc-page">
<xs:complexType>
<xs:attributeGroup ref="dfltattrs"/>
<xs:attribute name="he" use="required"/>
<xs:attribute name="wi" use="required"/>
<xs:attribute name="type" use="required">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="jpg"/>
<xs:enumeration value="pdf"/>
<xs:enumeration value="tif"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="alt"/>
<xs:attribute name="pp"/>
<xs:attribute name="ppf"/>
<xs:attribute name="ppl"/>
<xs:attribute name="file" use="required"/>
<xs:attribute name="color">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="color"/>
<xs:enumeration value="bw"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="orientation" default="portrait">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="portrait"/>
<xs:enumeration value="landscape"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="bibliographic-data">
<xs:complexType>
<xs:sequence>
<xs:element ref="publication-reference"/>
<xs:element minOccurs="0" ref="us-sir-flag"/>
<xs:element minOccurs="0" ref="application-reference"/>
<xs:element minOccurs="0" ref="priority-claims"/>
<xs:element minOccurs="0" ref="dates-of-public-availability"/>
<xs:element minOccurs="0" ref="rule-47-flag"/>
<xs:element minOccurs="0" ref="term-of-grant"/>
<xs:element minOccurs="0" ref="technical-data"/>
<xs:element minOccurs="0" ref="related-documents"/>
<xs:element minOccurs="0" ref="parties"/>
<xs:element minOccurs="0" ref="international-convention-data"/>
<xs:element minOccurs="0" ref="designated-states"/>
<xs:element minOccurs="0" ref="office-specific-data"/>
<xs:element minOccurs="0" ref="ifi-integrated-content"/>
<xs:element minOccurs="0" ref="ifi-annotated-data"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="office-specific-data">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="autags"/>
<xs:element ref="eptags"/>
<xs:element ref="ustags"/>
</xs:choice>
</xs:complexType>
</xs:element>
<xs:element name="eptags">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" ref="ep-no-a-document-published"/>
<xs:element minOccurs="0" ref="ep-limitations"/>
<xs:element minOccurs="0" ref="ep-petition-reviews"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="ep-no-a-document-published" type="xs:string"/>
<xs:element name="ustags">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" ref="us-gazette"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="us-gazette">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" ref="us-adverse-decisions"/>
<xs:element minOccurs="0" ref="us-certificates-of-correction"/>
<xs:element minOccurs="0" ref="us-disclaimers"/>
<xs:element minOccurs="0" ref="us-expirations"/>
<xs:element minOccurs="0" ref="us-extensions"/>
<xs:element minOccurs="0" ref="us-reexaminations"/>
<xs:element minOccurs="0" ref="us-reinstatements"/>
<xs:element minOccurs="0" ref="us-reissues"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="us-adverse-decisions">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="us-adverse-decision"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="us-adverse-decision">
<xs:complexType>
<xs:sequence>
<xs:element ref="date"/>
<xs:element minOccurs="0" ref="number"/>
<xs:element minOccurs="0" ref="text"/>
</xs:sequence>
<xs:attribute name="gazette-date" use="required"/>
</xs:complexType>
</xs:element>
<xs:element name="us-certificates-of-correction">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="us-certificate-of-correction"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="us-certificate-of-correction">
<xs:complexType>
<xs:sequence>
<xs:element ref="date"/>
</xs:sequence>
<xs:attribute name="gazette-date" use="required"/>
</xs:complexType>
</xs:element>
<xs:element name="us-disclaimers">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="us-disclaimer"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="us-disclaimer">
<xs:complexType>
<xs:sequence>
<xs:element ref="date"/>
<xs:element minOccurs="0" ref="text"/>
</xs:sequence>
<xs:attribute name="gazette-date" use="required"/>
</xs:complexType>
</xs:element>
<xs:element name="us-expirations">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="us-expiration"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="us-expiration">
<xs:complexType>
<xs:sequence>
<xs:element ref="date"/>
</xs:sequence>
<xs:attribute name="gazette-date" use="required"/>
</xs:complexType>
</xs:element>
<xs:element name="us-extensions">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="us-extension"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="us-extension">
<xs:complexType>
<xs:sequence>
<xs:element ref="date"/>
<xs:element minOccurs="0" ref="text"/>
<xs:element minOccurs="0" ref="original-expiration-date"/>
<xs:element minOccurs="0" ref="extended-expiration-date"/>
<xs:element minOccurs="0" ref="product-name"/>
</xs:sequence>
<xs:attribute name="gazette-date" use="required"/>
</xs:complexType>
</xs:element>
<xs:element name="original-expiration-date" type="xs:string"/>
<xs:element name="extended-expiration-date" type="xs:string"/>
<xs:element name="product-name" type="xs:string"/>
<xs:element name="us-reexaminations">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="us-reexamination"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="us-reexamination">
<xs:complexType>
<xs:sequence>
<xs:element ref="application-reference"/>
<xs:element minOccurs="0" ref="publication-reference"/>
<xs:element minOccurs="0" ref="number"/>
<xs:element minOccurs="0" ref="requester"/>
<xs:element minOccurs="0" ref="text"/>
</xs:sequence>
<xs:attribute name="gazette-date" use="required"/>
</xs:complexType>
</xs:element>
<xs:element name="requester">
<xs:complexType>
<xs:sequence>
<xs:element ref="addressbook"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="us-reinstatements">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="us-reinstatement"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="us-reinstatement">
<xs:complexType>
<xs:sequence>
<xs:element ref="date"/>
</xs:sequence>
<xs:attribute name="gazette-date" use="required"/>
</xs:complexType>
</xs:element>
<xs:element name="us-reissues">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="us-reissue"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="us-reissue">
<xs:complexType>
<xs:sequence>
<xs:element ref="application-reference"/>
<xs:element minOccurs="0" ref="publication-reference"/>
</xs:sequence>
<xs:attribute name="gazette-date" use="required"/>
</xs:complexType>
</xs:element>
<!--
@ucid: character identifier made up of country + document-number + kind,
e.g., US-5551212-A; EP-0700000-B1
@fvid: (internal) integer identifer used for QA/QC procedures
-->
<xs:element name="publication-reference">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="document-id"/>
</xs:sequence>
<xs:attributeGroup ref="dfltattrs"/>
<xs:attribute name="ucid" use="required"/>
<xs:attribute name="fvid"/>
<xs:attribute name="entity-status">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="micro"/>
<xs:enumeration value="small"/>
<xs:enumeration value="large"/>
<xs:enumeration value="unknown"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
<!--
@appl-type: US application type. This is reserverd for US only
but other values may be used in the future.
@us-series-code: US-only
@us-art-unit: US-only
@is-representative: see DOCDB ST36
-->
<xs:element name="application-reference">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="document-id"/>
<xs:element minOccurs="0" ref="effective-date"/>
</xs:sequence>
<xs:attributeGroup ref="dfltattrs"/>
<xs:attribute name="ucid"/>
<xs:attribute name="appl-type"/>
<xs:attribute name="us-series-code"/>
<xs:attribute name="us-art-unit"/>
<xs:attribute name="is-representative" default="NO">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="YES"/>
<xs:enumeration value="NO"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="effective-date">
<xs:complexType>
<xs:sequence>
<xs:element ref="date"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="priority-claims">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="priority-claim"/>
</xs:sequence>
<xs:attributeGroup ref="dfltattrs"/>
</xs:complexType>
</xs:element>
<xs:element name="priority-claim">
<xs:complexType>
<xs:sequence>
<xs:element ref="document-id"/>
<xs:element minOccurs="0" ref="office-of-filing"/>
<xs:choice minOccurs="0">
<xs:element ref="priority-doc-requested"/>
<xs:element ref="priority-doc-attached"/>
</xs:choice>
</xs:sequence>
<xs:attributeGroup ref="dfltattrs"/>
<xs:attribute name="ucid"/>
<xs:attribute name="kind">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="national"/>
<xs:enumeration value="regional"/>
<xs:enumeration value="international"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="linkage-type"/>
</xs:complexType>
</xs:element>
<xs:element name="priority-doc-attached">
<xs:complexType/>
</xs:element>
<xs:element name="priority-doc-requested">
<xs:complexType/>
</xs:element>
<xs:element name="rule-47-flag">
<xs:complexType/>
</xs:element>
<xs:element name="term-of-grant">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="text"/>
<xs:element ref="disclaimer"/>
<xs:element ref="length-of-grant"/>
<xs:element ref="us-term-extension"/>
<xs:element ref="lapse-of-patent"/>
</xs:choice>
<xs:attributeGroup ref="dfltattrs"/>
</xs:complexType>
</xs:element>
<xs:element name="disclaimer">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" ref="date"/>
<xs:element minOccurs="0" ref="text"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="length-of-grant" type="xs:string"/>
<xs:element name="us-term-extension" type="xs:string"/>
<xs:element name="lapse-of-patent">
<xs:complexType>
<xs:sequence>
<xs:element ref="document-id"/>
<xs:element minOccurs="0" ref="text"/>
</xs:sequence>
<xs:attributeGroup ref="dfltattrs"/>
</xs:complexType>
</xs:element>
<!--
With the exception of gazette-date, one of the following dates
will be identical to publication-reference/date.
Individual usage depends on publication-reference/kind
US (1836-1999):
A, S, P
H, E, I (granted-publication-date)
(2000-Present):
B1, B2,
P2, P3
S1, E1
H1 (granted-publication-date)
A1, P1 (application-publication)
A2 (republication-date)
A9 (corrected-publication-date)
EP
A1, A2 (application-publication-date)
A3 (search-report-publication-date)
A8 (amended-publication-date)
A9 (corrected-publication-date)
B1 (grant-publication-date)
B2 (republication-date)
B8 (amended-publication-date)
B9 (corrected-publication-date)
WO
A1, A2 (application-publication-date)
A3 (search-report-publication-date)
A8 (amended-publication-date)
A9 (corrected-publication-date)
-->
<xs:element name="dates-of-public-availability">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" ref="gazette-date"/>
<xs:element minOccurs="0" ref="application-publication-date"/>
<xs:element minOccurs="0" ref="grant-publication-date"/>
<xs:element minOccurs="0" ref="intention-to-grant-date"/>
<xs:element minOccurs="0" ref="registered-date"/>
<xs:element minOccurs="0" ref="republication-date"/>
<xs:element minOccurs="0" ref="search-report-publication-date"/>
<xs:element minOccurs="0" ref="search-report-dispatch-date"/>
<xs:element minOccurs="0" ref="corrected-search-report-dispatch-date"/>
<xs:element minOccurs="0" ref="coming-into-force-date"/>
<xs:element minOccurs="0" ref="preceding-publication-date"/>
<xs:element minOccurs="0" ref="amended-publication-date"/>
<xs:element minOccurs="0" ref="corrected-publication-date"/>
<xs:element minOccurs="0" ref="declassified-date"/>
</xs:sequence>
<xs:attributeGroup ref="dfltattrs"/>
</xs:complexType>
</xs:element>
<xs:element name="gazette-date">
<xs:complexType>
<xs:sequence>
<xs:element ref="date"/>
<xs:element minOccurs="0" ref="bulletin-number"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="application-publication-date">
<xs:complexType>
<xs:sequence>
<xs:element ref="date"/>
<xs:element minOccurs="0" ref="bulletin-number"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="grant-publication-date">
<xs:complexType>
<xs:sequence>
<xs:element ref="date"/>
<xs:element minOccurs="0" ref="bulletin-number"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="intention-to-grant-date">
<xs:complexType>
<xs:sequence>
<xs:element ref="date"/>
<xs:element minOccurs="0" ref="bulletin-number"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="registered-date">
<xs:complexType>
<xs:sequence>
<xs:element ref="date"/>
<xs:element minOccurs="0" ref="bulletin-number"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="republication-date">
<xs:complexType>
<xs:sequence>
<xs:element ref="date"/>
<xs:element minOccurs="0" ref="bulletin-number"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="search-report-publication-date">
<xs:complexType>
<xs:sequence>
<xs:element ref="date"/>
<xs:element minOccurs="0" ref="bulletin-number"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="search-report-dispatch-date">
<xs:complexType>
<xs:sequence>
<xs:element ref="date"/>
<xs:element minOccurs="0" ref="bulletin-number"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="corrected-search-report-dispatch-date">
<xs:complexType>
<xs:sequence>
<xs:element ref="date"/>
<xs:element minOccurs="0" ref="bulletin-number"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="coming-into-force-date">
<xs:complexType>
<xs:sequence>
<xs:element ref="date"/>
<xs:element minOccurs="0" ref="bulletin-number"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="preceding-publication-date">
<xs:complexType>
<xs:sequence>
<xs:element ref="date"/>
<xs:element minOccurs="0" ref="bulletin-number"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="amended-publication-date">
<xs:complexType>
<xs:sequence>
<xs:element ref="date"/>
<xs:element minOccurs="0" ref="bulletin-number"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="corrected-publication-date">
<xs:complexType>
<xs:sequence>
<xs:element ref="date"/>
<xs:element minOccurs="0" ref="bulletin-number"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="declassified-date">
<xs:complexType>
<xs:sequence>
<xs:element ref="date"/>
<xs:element minOccurs="0" ref="bulletin-number"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="technical-data">
<xs:complexType>
<xs:sequence>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="classification-ipc"/>
<xs:element ref="classification-locarno"/>
</xs:choice>
<xs:element minOccurs="0" ref="classifications-ipcr"/>
<xs:element minOccurs="0" ref="classification-national"/>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="classification-ecla"/>
<xs:element minOccurs="0" ref="classifications-cpc"/>
<xs:element minOccurs="0" ref="f-term-info"/>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="invention-title"/>
<xs:group minOccurs="0" ref="cit:citations"/>
<xs:element minOccurs="0" ref="figures"/>
<xs:element minOccurs="0" ref="field-of-search"/>
<xs:element minOccurs="0" ref="statistical-information"/>
</xs:sequence>
<xs:attributeGroup ref="dfltattrs"/>
</xs:complexType>
</xs:element>
<xs:element name="classification-ipc">
<xs:complexType>
<xs:sequence>
<xs:element ref="edition"/>
<xs:element ref="main-classification"/>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="further-classification"/>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="additional-info"/>
<xs:element ref="linked-indexing-code-group"/>
<xs:element ref="unlinked-indexing-code"/>
</xs:choice>
<xs:element minOccurs="0" ref="text"/>
</xs:sequence>
<xs:attributeGroup ref="dfltattrs"/>
</xs:complexType>
</xs:element>
<xs:element name="edition" type="xs:string"/>
<xs:element name="main-classification">
<xs:complexType mixed="true">
<xs:attributeGroup ref="dfltattrs"/>
<xs:attribute name="jp-facet"/>
</xs:complexType>
</xs:element>
<xs:element name="further-classification">
<xs:complexType mixed="true">
<xs:attributeGroup ref="dfltattrs"/>
<xs:attribute name="jp-facet"/>
</xs:complexType>
</xs:element>
<xs:element name="additional-info">
<xs:complexType mixed="true">
<xs:attributeGroup ref="dfltattrs"/>
</xs:complexType>
</xs:element>
<xs:element name="linked-indexing-code-group">
<xs:complexType>
<xs:sequence>
<xs:element ref="main-linked-indexing-code"/>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="sub-linked-indexing-code"/>
</xs:sequence>
<xs:attributeGroup ref="dfltattrs"/>
<xs:attribute name="group" use="required"/>
</xs:complexType>
</xs:element>
<xs:element name="main-linked-indexing-code">
<xs:complexType mixed="true">
<xs:attributeGroup ref="dfltattrs"/>
</xs:complexType>
</xs:element>
<xs:element name="sub-linked-indexing-code">
<xs:complexType mixed="true">
<xs:attributeGroup ref="dfltattrs"/>
</xs:complexType>
</xs:element>
<xs:element name="unlinked-indexing-code">
<xs:complexType mixed="true">
<xs:attributeGroup ref="dfltattrs"/>
</xs:complexType>
</xs:element>
<!-- For US design patents only. -->
<xs:element name="classification-locarno">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" ref="edition"/>
<xs:element ref="main-classification"/>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="further-classification"/>
<xs:element minOccurs="0" ref="text"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="classifications-ipcr">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="classification-ipcr"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="classifications-ipcr-original">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="classification-ipcr"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<!--
<!ATTLIST classifications-ipcr-original
as-of-date CDATA #REQUIRED
>
-->
<xs:element name="classifications-ipcr-current">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="classification-ipcr"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="classification-ipcr">
<xs:complexType mixed="true">
<xs:attributeGroup ref="dfltattrs"/>
<xs:attribute name="sequence"/>
</xs:complexType>
</xs:element>
<!--
This element will appear mainly in US data and DOCDB (US, GB and CA).
US data will make use of '(main|further)-classification' and
DOCDB will be limited to the 'text' child. Where DOCDB delivers
US classes (country=US) and there are classifications from USPTO,
USPTO classes will be preferred and delivered and DOCDB US classes
will be suppressed.
-->
<xs:element name="classification-national">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" ref="edition"/>
<xs:element minOccurs="0" ref="main-classification"/>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="further-classification"/>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="additional-info"/>
<xs:element ref="linked-indexing-code-group"/>
<xs:element ref="unlinked-indexing-code"/>
</xs:choice>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="text"/>
</xs:sequence>
<xs:attributeGroup ref="dfltattrs"/>
<xs:attribute name="country" use="required"/>
</xs:complexType>
</xs:element>
<xs:element name="classification-national-original">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="classification-national"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="classification-national-current">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="classification-national"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="classification-ecla">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="classification-symbol"/>
</xs:sequence>
<xs:attributeGroup ref="dfltattrs"/>
</xs:complexType>
</xs:element>
<xs:element name="classification-symbol">
<xs:complexType mixed="true">
<xs:attributeGroup ref="dfltattrs"/>
<!-- <xs:attribute name="country"/> -->
<xs:attribute name="scheme" use="required">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="EC"/>
<xs:enumeration value="ICO"/>
<xs:enumeration value="IDT"/>
<xs:enumeration value="ECNO"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="classifications-cpc">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="classification-cpc"/>
<xs:element minOccurs="0" ref="combination-sets"/>
</xs:sequence>
<xs:attributeGroup ref="dfltattrs"/>
</xs:complexType>
</xs:element>
<xs:element name="classification-cpc">
<xs:complexType mixed="true">
<xs:attributeGroup ref="dfltattrs"/>
<xs:attribute name="scheme" use="required">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="CPC"/>
<xs:enumeration value="CPCNO"/>
<xs:enumeration value="CPCI"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="rank"/>
</xs:complexType>
</xs:element>
<xs:element name="combination-sets">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="combination-set"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="combination-set">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="classification-cpc"/>
</xs:sequence>
<xs:attributeGroup ref="dfltattrs"/>
<xs:attribute name="group" use="required"/>
</xs:complexType>
</xs:element>
<xs:element name="f-term-info">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="f-terms"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="f-terms">
<xs:complexType>
<xs:sequence>
<xs:element ref="theme-code"/>
<xs:element maxOccurs="unbounded" ref="f-term"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="f-term">
<xs:complexType mixed="true">
<xs:attributeGroup ref="dfltattrs"/>
</xs:complexType>
</xs:element>
<xs:element name="theme-code" type="xs:string"/>
<xs:element name="invention-title">
<xs:complexType mixed="true">
<xs:attributeGroup ref="dfltattrs"/>
<xs:attribute name="lang" use="required"/>
</xs:complexType>
</xs:element>
<!-- information about drawings and figures -->
<xs:element name="figures">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" ref="number-of-drawing-sheets"/>
<xs:element minOccurs="0" ref="number-of-figures"/>
<xs:element minOccurs="0" ref="figure-to-publish"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="number-of-drawing-sheets" type="xs:string"/>
<xs:element name="number-of-figures" type="xs:string"/>
<xs:element name="figure-to-publish" type="xs:string"/>
<!-- search classifications -->
<xs:element name="field-of-search">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="classification-national"/>
<xs:element ref="classification-ipc"/>
<xs:element ref="classifications-cpc"/>
<xs:element ref="classification-locarno"/>
<xs:element ref="classifications-ipcr"/>
</xs:choice>
<xs:attributeGroup ref="dfltattrs"/>
</xs:complexType>
</xs:element>
<xs:element name="statistical-information">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" ref="number-of-pages"/>
<xs:element minOccurs="0" ref="number-of-claims"/>
<xs:element minOccurs="0" ref="exemplary-claim"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="number-of-pages" type="xs:string"/>
<xs:element name="number-of-claims" type="xs:string"/>
<xs:element name="exemplary-claim" type="xs:string"/>
<xs:element name="related-documents">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="relation"/>
</xs:sequence>
<xs:attributeGroup ref="dfltattrs"/>
</xs:complexType>
</xs:element>
<!--
ST32 Equivalence:
previously-filed-application => b270
addition => b610
division => b620
division-into => b620ep
continuation => b631
continuation-in-part => b632
continuing-reissue => b633
reissue => b640
us-divisional-reissue => b641us
reexamination => b645
us-reexamination-reissue-merger => b645us
substitution => b660
correction => b665
utility-model-basis => b670
us-provisional-application => b680
related-publication => b690
-->
<xs:element name="relation">
<xs:complexType>
<xs:choice>
<xs:element maxOccurs="unbounded" ref="document-id"/>
<xs:sequence>
<xs:element ref="child-doc"/>
<xs:element ref="parent-doc"/>
</xs:sequence>
</xs:choice>
<xs:attribute name="type" use="required">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="a-371-of-international"/>
<xs:enumeration value="addition"/>
<xs:enumeration value="continuation"/>
<xs:enumeration value="continuation-in-part"/>
<xs:enumeration value="continuing-reissue"/>
<xs:enumeration value="correction"/>
<xs:enumeration value="division"/>
<xs:enumeration value="division-into"/>
<xs:enumeration value="later-filed-application"/>
<xs:enumeration value="previously-filed-application"/>
<xs:enumeration value="provisional"/>
<xs:enumeration value="reexamination"/>
<xs:enumeration value="reissue"/>
<xs:enumeration value="related-publication"/>
<xs:enumeration value="substitution"/>
<xs:enumeration value="us-divisional-reissue"/>
<xs:enumeration value="us-provisional-application"/>
<xs:enumeration value="us-reexamination-reissue-merger"/>
<xs:enumeration value="utility-model-basis"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="parent-doc">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="document-id"/>
<xs:element minOccurs="0" ref="parent-grant-document"/>
<xs:element minOccurs="0" ref="parent-pct-document"/>
</xs:sequence>
<xs:attribute name="ucid" use="required"/>
<xs:attribute name="psta" default="unknown">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="granted"/>
<xs:enumeration value="pending"/>
<xs:enumeration value="abandoned"/>
<xs:enumeration value="SIR"/>
<xs:enumeration value="unknown"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="cpa">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="yes"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="parent-grant-document">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="document-id"/>
</xs:sequence>
<xs:attribute name="ucid" use="required"/>
</xs:complexType>
</xs:element>
<xs:element name="parent-pct-document">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="document-id"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="child-pct-document">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="document-id"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="child-doc">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="document-id"/>
<xs:element minOccurs="0" ref="child-pct-document"/>
</xs:sequence>
<xs:attribute name="ucid" use="required"/>
</xs:complexType>
</xs:element>
<!-- Attributes used to define data format of party -->
<xs:simpleType name="fmtattrs">
<xs:restriction base="xs:token">
<xs:enumeration value="original"/>
<xs:enumeration value="standard"/>
<xs:enumeration value="epo"/>
<xs:enumeration value="uspto"/>
<xs:enumeration value="intermediate"/>
<xs:enumeration value="original-translated"/>
</xs:restriction>
</xs:simpleType>
<xs:element name="parties">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" ref="applicants"/>
<xs:element minOccurs="0" ref="inventors"/>
<xs:element minOccurs="0" ref="assignees"/>
<xs:element minOccurs="0" ref="assignee-history"/>
<xs:element minOccurs="0" ref="correspondence-address"/>
<xs:element minOccurs="0" ref="agents"/>
<xs:element minOccurs="0" ref="examiners"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="applicants">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="applicant"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="applicant">
<xs:complexType>
<xs:sequence>
<xs:element ref="addressbook"/>
</xs:sequence>
<xs:attributeGroup ref="dfltattrs"/>
<xs:attribute name="format" default="original" type="fmtattrs"/>
<xs:attribute name="sequence"/>
<xs:attribute name="applicant-category"/>
</xs:complexType>
</xs:element>
<xs:element name="inventors">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="inventor"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="inventor">
<xs:complexType>
<xs:sequence>
<xs:element ref="addressbook"/>
</xs:sequence>
<xs:attributeGroup ref="dfltattrs"/>
<xs:attribute name="format" default="original" type="fmtattrs"/>
<xs:attribute name="sequence"/>
</xs:complexType>
</xs:element>
<xs:element name="assignees">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="assignee"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<!--
@us-assignee-type: for assignee type, one of the following codes is used.
- 01 Unassigned
- 02 United States company or corporation
- 03 Foreign company or corporation
- 04 United States individual
- 05 Foreign individual
- 06 U.S. Federal government
- 07 Foreign government
- 08 U.S. county government
- 09 U.S. state government
-->
<xs:element name="assignee">
<xs:complexType>
<xs:sequence>
<xs:element ref="addressbook"/>
</xs:sequence>
<xs:attributeGroup ref="dfltattrs"/>
<xs:attribute name="format" default="original" type="fmtattrs"/>
<xs:attribute name="us-assignee-type"/>
<xs:attribute name="sequence"/>
<xs:attribute name="enabled"/>
<xs:attribute name="disabled"/>
</xs:complexType>
</xs:element>
<xs:element name="assignors">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="assignor"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="assignor">
<xs:complexType>
<xs:sequence>
<xs:element ref="addressbook"/>
</xs:sequence>
<xs:attributeGroup ref="dfltattrs"/>
<xs:attribute name="format" default="original" type="fmtattrs"/>
<xs:attribute name="sequence"/>
<xs:attribute name="execution-date"/>
</xs:complexType>
</xs:element>
<xs:element name="assignee-history" type="reassignments"/>
<xs:complexType name="reassignments">
<xs:sequence>
<xs:element ref="reassignments"/>
</xs:sequence>
</xs:complexType>
<xs:element name="reassignments">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="reassignment"/>
</xs:sequence>
<xs:attributeGroup ref="dfltattrs"/>
</xs:complexType>
</xs:element>
<!--
Although reassignment information is available as a legal status
event from PRS (EPO) data, the timeliness and completeness is
very questionable.
Each reassignment element corresponds to an entry in the reel/frame
delivery of the USPTO Daily Reassignment data feed.
-->
<xs:element name="reassignment">
<xs:complexType>
<xs:sequence>
<xs:element ref="assignees"/>
<xs:element ref="assignors"/>
<xs:element minOccurs="0" ref="correspondence-address"/>
<xs:element minOccurs="0" ref="conveyance"/>
</xs:sequence>
<xs:attributeGroup ref="dfltattrs"/>
<xs:attribute name="reel-frame"/>
<xs:attribute name="recorded-date" use="required"/>
</xs:complexType>
</xs:element>
<xs:element name="conveyance" type="xs:string"/>
<xs:element name="agents">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="agent"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="agent">
<xs:complexType>
<xs:sequence>
<xs:element ref="addressbook"/>
</xs:sequence>
<xs:attributeGroup ref="dfltattrs"/>
<xs:attribute name="format" default="original" type="fmtattrs"/>
<xs:attribute name="sequence"/>
</xs:complexType>
</xs:element>
<xs:element name="correspondence-address">
<xs:complexType>
<xs:sequence>
<xs:element ref="addressbook"/>
</xs:sequence>
<xs:attributeGroup ref="dfltattrs"/>
<xs:attribute name="format" default="original" type="fmtattrs"/>
<xs:attribute name="sequence"/>
</xs:complexType>
</xs:element>
<xs:element name="examiners">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="examiner"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="examiner">
<xs:complexType>
<xs:sequence>
<xs:element ref="addressbook"/>
</xs:sequence>
<xs:attributeGroup ref="dfltattrs"/>
<xs:attribute name="examiner-level" use="required">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="primary"/>
<xs:enumeration value="assistant"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="format" default="original" type="fmtattrs"/>
<xs:attribute name="sequence"/>
</xs:complexType>
</xs:element>
<xs:element name="name" type="xs:string"/>
<xs:element name="prefix" type="xs:string"/>
<xs:element name="last-name" type="xs:string"/>
<xs:element name="orgname" type="xs:string"/>
<xs:element name="first-name" type="xs:string"/>
<xs:element name="middle-name" type="xs:string"/>
<xs:element name="suffix" type="xs:string"/>
<xs:element name="iid" type="xs:string"/>
<xs:element name="role" type="xs:string"/>
<xs:element name="department" type="xs:string"/>
<xs:element name="synonym" type="xs:string"/>
<xs:element name="registered-number" type="xs:string"/>
<xs:complexType name="adr">
<xs:choice>
<xs:sequence>
<xs:element minOccurs="0" ref="address-1"/>
<xs:element minOccurs="0" ref="address-2"/>
<xs:element minOccurs="0" ref="address-3"/>
<xs:element minOccurs="0" ref="mailcode"/>
<xs:element minOccurs="0" ref="pobox"/>
<xs:element minOccurs="0" ref="room"/>
<xs:element minOccurs="0" ref="address-floor"/>
<xs:element minOccurs="0" ref="building"/>
<xs:element minOccurs="0" ref="street"/>
<xs:element minOccurs="0" ref="city"/>
<xs:element minOccurs="0" ref="county"/>
<xs:element minOccurs="0" ref="state"/>
<xs:element minOccurs="0" ref="postcode"/>
<xs:element minOccurs="0" ref="country"/>
<xs:element minOccurs="0" ref="administrative-division"/>
</xs:sequence>
<xs:element ref="text"/>
</xs:choice>
</xs:complexType>
<xs:element name="address-1" type="xs:string"/>
<xs:element name="address-2" type="xs:string"/>
<xs:element name="address-3" type="xs:string"/>
<xs:element name="mailcode" type="xs:string"/>
<xs:element name="pobox" type="xs:string"/>
<xs:element name="room" type="xs:string"/>
<xs:element name="address-floor" type="xs:string"/>
<xs:element name="building" type="xs:string"/>
<xs:element name="street" type="xs:string"/>
<xs:element name="city" type="xs:string"/>
<xs:element name="county" type="xs:string"/>
<xs:element name="state" type="xs:string"/>
<xs:element name="postcode" type="xs:string"/>
<xs:element name="administrative-division" type="xs:string"/>
<!-- country defined below -->
<!-- text defined below -->
<xs:element name="address" type="adr"/>
<xs:element name="addressbook">
<xs:complexType>
<xs:choice>
<xs:sequence>
<xs:group ref="nam"/>
<xs:element minOccurs="0" ref="address"/>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="phone"/>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="fax"/>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="email"/>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="url"/>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="ead"/>
<xs:element minOccurs="0" ref="dtext"/>
</xs:sequence>
<xs:element ref="text"/>
</xs:choice>
</xs:complexType>
</xs:element>
<xs:element name="phone" type="xs:string"/>
<xs:element name="fax" type="xs:string"/>
<xs:element name="email" type="xs:string"/>
<xs:element name="url" type="xs:string"/>
<xs:element name="ead" type="xs:string"/>
<!-- dtext defined below -->
<!-- text defined below -->
<xs:element name="international-convention-data">
<xs:complexType>
<xs:sequence>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="pct-or-regional-filing-data"/>
<xs:element ref="pct-or-regional-publishing-data"/>
</xs:choice>
<xs:element minOccurs="0" ref="designated-states"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="pct-or-regional-filing-data">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="document-id"/>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="national-entry-date"/>
</xs:sequence>
<xs:attributeGroup ref="dfltattrs"/>
<xs:attribute name="ucid" use="required"/>
</xs:complexType>
</xs:element>
<xs:element name="national-entry-date">
<xs:complexType>
<xs:sequence>
<xs:element ref="date"/>
</xs:sequence>
<xs:attribute name="type"/>
</xs:complexType>
</xs:element>
<xs:element name="pct-or-regional-publishing-data">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="document-id"/>
</xs:sequence>
<xs:attributeGroup ref="dfltattrs"/>
<xs:attribute name="ucid" use="required"/>
</xs:complexType>
</xs:element>
<xs:element name="designated-states">
<xs:complexType>
<xs:sequence>
<xs:choice>
<xs:element ref="pct-designated-states"/>
<xs:element ref="ep-contracting-states"/>
</xs:choice>
<xs:element minOccurs="0" ref="ep-extended-states"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="pct-designated-states">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="country"/>
<xs:element ref="regional"/>
</xs:choice>
</xs:complexType>
</xs:element>
<xs:element name="ep-contracting-states">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="country"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="ep-extended-states">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="ep-extended-state-data"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="ep-extended-state-data">
<xs:complexType>
<xs:sequence>
<xs:element ref="country"/>
<xs:element minOccurs="0" ref="date"/>
<xs:element minOccurs="0" ref="withdrawal-date"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="withdrawal-date">
<xs:complexType>
<xs:sequence>
<xs:element ref="date"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<!--
DE T document additional info
Coming soon...
-->
<!-- <!ELEMENT translation-data > -->
<xs:element name="document-id">
<xs:complexType>
<xs:sequence>
<xs:element ref="country"/>
<xs:element minOccurs="0" ref="doc-number"/>
<xs:element minOccurs="0" ref="kind"/>
<xs:element minOccurs="0" ref="name"/>
<xs:element minOccurs="0" ref="date"/>
<xs:element minOccurs="0" ref="dtext"/>
<xs:element minOccurs="0" ref="lang"/>
</xs:sequence>
<xs:attributeGroup ref="dfltattrs"/>
<xs:attribute name="format" default="original">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="original"/>
<xs:enumeration value="standard"/>
<xs:enumeration value="epo"/>
<xs:enumeration value="uspto"/>
<xs:enumeration value="mxw-std"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="sequence"/>
</xs:complexType>
</xs:element>
<xs:element name="regional">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="country"/>
</xs:sequence>
<xs:attribute name="region" use="required"/>
</xs:complexType>
</xs:element>
<xs:element name="country">
<xs:complexType mixed="true">
<xs:attributeGroup ref="dfltattrs"/>
</xs:complexType>
</xs:element>
<xs:element name="region" type="xs:string"/>
<xs:element name="doc-number" type="xs:string"/>
<xs:element name="kind" type="xs:string"/>
<xs:element name="date" type="xs:string"/>
<xs:element name="bulletin-number" type="xs:string"/>
<xs:element name="dtext" type="xs:string"/>
<xs:element name="text" type="xs:string"/>
<xs:element name="lang" type="xs:string"/>
<xs:element name="office-of-filing">
<xs:complexType>
<xs:choice>
<xs:sequence>
<xs:element ref="region"/>
<xs:element minOccurs="0" ref="country"/>
</xs:sequence>
<xs:element ref="country"/>
</xs:choice>
</xs:complexType>
</xs:element>
<!-- Country specific ... -->
<xs:element name="us-sir-flag">
<xs:complexType/>
</xs:element>
<!-- Textual Markup -->
<xs:element name="abstract">
<xs:complexType>
<xs:choice>
<xs:sequence>
<xs:element ref="abst-problem"/>
<xs:element ref="abst-solution"/>
</xs:sequence>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="heading"/>
<xs:element ref="p"/>
<xs:element ref="img"/>
<xs:element ref="imgref"/>
</xs:choice>
</xs:choice>
<xs:attributeGroup ref="dfltattrs"/>
<xs:attribute name="lang" use="required"/>
<xs:attribute name="source"/>
</xs:complexType>
</xs:element>
<xs:element name="abst-problem">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="p"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="abst-solution">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="p"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="description">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" ref="invention-title"/>
<xs:choice maxOccurs="unbounded">
<xs:element ref="technical-field"/>
<xs:element ref="background-art"/>
<xs:element ref="disclosure"/>
<xs:element ref="description-of-drawings"/>
<xs:element ref="best-mode"/>
<xs:element ref="mode-for-invention"/>
<xs:element ref="industrial-applicability"/>
<xs:element ref="summary-of-invention"/>
<xs:element ref="description-of-embodiments"/>
<xs:element ref="reference-signs-list"/>
<xs:element ref="reference-to-deposited-biological-material"/>
<xs:element ref="citation-list"/>
<xs:element ref="sequence-list-text"/>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="heading"/>
<xs:element ref="img"/>
<xs:element ref="imgref"/>
<xs:element ref="p"/>
</xs:choice>
</xs:choice>
</xs:sequence>
<xs:attributeGroup ref="dfltattrs"/>
<xs:attribute name="lang" use="required"/>
</xs:complexType>
</xs:element>
<xs:element name="technical-field">
<xs:complexType>
<xs:sequence maxOccurs="unbounded">
<xs:element minOccurs="0" maxOccurs="unbounded" ref="heading"/>
<xs:element maxOccurs="unbounded" ref="p"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="background-art">
<xs:complexType>
<xs:sequence maxOccurs="unbounded">
<xs:element minOccurs="0" maxOccurs="unbounded" ref="heading"/>
<xs:element maxOccurs="unbounded" ref="p"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="disclosure">
<xs:complexType>
<xs:choice>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="tech-problem"/>
<xs:element ref="tech-solution"/>
<xs:element ref="advantageous-effects"/>
</xs:choice>
<xs:sequence maxOccurs="unbounded">
<xs:element minOccurs="0" maxOccurs="unbounded" ref="heading"/>
<xs:element maxOccurs="unbounded" ref="p"/>
</xs:sequence>
</xs:choice>
</xs:complexType>
</xs:element>
<xs:element name="tech-problem">
<xs:complexType>
<xs:sequence maxOccurs="unbounded">
<xs:element minOccurs="0" maxOccurs="unbounded" ref="heading"/>
<xs:element maxOccurs="unbounded" ref="p"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="tech-solution">
<xs:complexType>
<xs:sequence maxOccurs="unbounded">
<xs:element minOccurs="0" maxOccurs="unbounded" ref="heading"/>
<xs:element maxOccurs="unbounded" ref="p"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="advantageous-effects">
<xs:complexType>
<xs:sequence maxOccurs="unbounded">
<xs:element minOccurs="0" maxOccurs="unbounded" ref="heading"/>
<xs:element maxOccurs="unbounded" ref="p"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="description-of-drawings">
<xs:complexType>
<xs:sequence maxOccurs="unbounded">
<xs:element minOccurs="0" maxOccurs="unbounded" ref="heading"/>
<xs:element maxOccurs="unbounded" ref="p"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="best-mode">
<xs:complexType>
<xs:sequence maxOccurs="unbounded">
<xs:element minOccurs="0" maxOccurs="unbounded" ref="heading"/>
<xs:element maxOccurs="unbounded" ref="p"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="mode-for-invention">
<xs:complexType>
<xs:sequence maxOccurs="unbounded">
<xs:element minOccurs="0" maxOccurs="unbounded" ref="heading"/>
<xs:element maxOccurs="unbounded" ref="p"/>
</xs:sequence>
<xs:attribute name="mode-num"/>
</xs:complexType>
</xs:element>
<xs:element name="industrial-applicability">
<xs:complexType>
<xs:sequence maxOccurs="unbounded">
<xs:element minOccurs="0" maxOccurs="unbounded" ref="heading"/>
<xs:element maxOccurs="unbounded" ref="p"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="sequence-list-text">
<xs:complexType>
<xs:sequence maxOccurs="unbounded">
<xs:element minOccurs="0" maxOccurs="unbounded" ref="heading"/>
<xs:element maxOccurs="unbounded" ref="p"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<!--
BEGIN: new description sub-sections delivered by JPO
NOTE: this is a bonus for USA-Redbook as summary-of-invention
was disallowed until now
-->
<xs:element name="summary-of-invention">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element ref="tech-problem"/>
<xs:element ref="tech-solution"/>
<xs:element ref="advantageous-effects"/>
<xs:sequence maxOccurs="unbounded">
<xs:element minOccurs="0" maxOccurs="unbounded" ref="heading"/>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="p"/>
</xs:sequence>
</xs:choice>
<xs:attributeGroup ref="dfltattrs"/>
</xs:complexType>
</xs:element>
<xs:element name="description-of-embodiments">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element ref="embodiments-example"/>
<xs:sequence maxOccurs="unbounded">
<xs:element minOccurs="0" maxOccurs="unbounded" ref="heading"/>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="p"/>
</xs:sequence>
</xs:choice>
<xs:attributeGroup ref="dfltattrs"/>
</xs:complexType>
</xs:element>
<xs:element name="embodiments-example">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="p"/>
</xs:sequence>
<xs:attributeGroup ref="dfltattrs"/>
<xs:attribute name="ex-num"/>
</xs:complexType>
</xs:element>
<xs:element name="reference-signs-list">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="p"/>
</xs:sequence>
<xs:attributeGroup ref="dfltattrs"/>
</xs:complexType>
</xs:element>
<xs:element name="reference-to-deposited-biological-material">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="p"/>
</xs:sequence>
<xs:attributeGroup ref="dfltattrs"/>
</xs:complexType>
</xs:element>
<xs:element name="citation-list">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element ref="patent-literature"/>
<xs:element ref="non-patent-literature"/>
<xs:sequence maxOccurs="unbounded">
<xs:element minOccurs="0" maxOccurs="unbounded" ref="heading"/>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="p"/>
</xs:sequence>
</xs:choice>
<xs:attributeGroup ref="dfltattrs"/>
</xs:complexType>
</xs:element>
<xs:element name="patent-literature">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="p"/>
</xs:sequence>
<xs:attributeGroup ref="dfltattrs"/>
</xs:complexType>
</xs:element>
<xs:element name="non-patent-literature">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="p"/>
</xs:sequence>
<xs:attributeGroup ref="dfltattrs"/>
</xs:complexType>
</xs:element>
<!-- END: new description sub-sections delivered by JPO -->
<xs:element name="claims">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" ref="claim-statement"/>
<xs:element maxOccurs="unbounded" ref="claim"/>
</xs:sequence>
<xs:attributeGroup ref="dfltattrs"/>
<xs:attribute name="lang" use="required"/>
<xs:attribute name="claim-type"/>
</xs:complexType>
</xs:element>
<xs:element name="claim-statement">
<xs:complexType mixed="true">
<xs:group minOccurs="0" maxOccurs="unbounded" ref="ptext"/>
</xs:complexType>
</xs:element>
<xs:element name="claim">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="claim-text"/>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"/>
<xs:attribute name="num"/>
<xs:attribute name="claim-type"/>
</xs:complexType>
</xs:element>
<xs:element name="claim-text">
<xs:complexType mixed="true">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:group ref="ptext"/>
<xs:element ref="st32chem"/>
<xs:element ref="st32math"/>
<xs:element ref="claim-text"/>
<xs:element ref="claim-ref"/>
</xs:choice>
</xs:complexType>
</xs:element>
<xs:element name="claim-ref">
<xs:complexType mixed="true">
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="claim-text"/>
</xs:sequence>
<xs:attribute name="idref" use="required" type="xs:IDREF"/>
</xs:complexType>
</xs:element>
<xs:element name="amended-claims">
<xs:complexType>
<xs:sequence maxOccurs="unbounded">
<xs:element minOccurs="0" ref="heading"/>
<xs:element maxOccurs="unbounded" ref="claim"/>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="amended-claims-statement"/>
</xs:sequence>
<xs:attributeGroup ref="dfltattrs"/>
<xs:attribute name="lang" use="required"/>
<!-- <xs:attribute name="country"/> -->
<xs:attribute name="amended-claim-type"/>
</xs:complexType>
</xs:element>
<xs:element name="amended-claims-statement">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="claims-statement"/>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"/>
<xs:attribute name="lang"/>
<xs:attribute name="status"/>
</xs:complexType>
</xs:element>
<xs:element name="claims-statement">
<xs:complexType>
<xs:sequence maxOccurs="unbounded">
<xs:element minOccurs="0" maxOccurs="unbounded" ref="heading"/>
<xs:element maxOccurs="unbounded" ref="p"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="drawings">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="figure"/>
</xs:sequence>
<xs:attributeGroup ref="dfltattrs"/>
<xs:attribute name="lang"/>
</xs:complexType>
</xs:element>
<!--
Search report data
@srep-office 'EP'
@date-produced: date finished by examiner
@srep-type: determines layout of search report
- epo-srep => normal layout
- ep-Rule45partial => pre-EPC 2000
- ep-Rule45declaration => layout for declaration, no citations
- isr International Search Report layout
-->
<xs:element name="search-report-data">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="doc-page"/>
</xs:sequence>
<xs:attributeGroup ref="dfltattrs"/>
<xs:attribute name="lang"/>
<xs:attribute name="srep-office"/>
<xs:attribute name="date-produced"/>
<xs:attribute name="srep-type"/>
</xs:complexType>
</xs:element>
<!-- Keywords -->
<xs:element name="keywords">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="keyword-set"/>
</xs:sequence>
<xs:attributeGroup ref="dfltattrs"/>
<xs:attribute name="lang" use="required"/>
<xs:attribute name="format" default="original" type="fmtattrs"/>
</xs:complexType>
</xs:element>
<xs:element name="keyword-set">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="keyword"/>
</xs:sequence>
<xs:attribute name="technical-field"/>
<xs:attribute name="subjects-number"/>
</xs:complexType>
</xs:element>
<xs:element name="keyword">
<xs:complexType mixed="true">
<xs:attribute name="sequence"/>
<xs:attribute name="pfq"/>
<xs:attribute name="dvalue"/>
</xs:complexType>
</xs:element>
<!-- Legal Status -->
<xs:element name="legal-status">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="legal-event"/>
</xs:sequence>
<xs:attributeGroup ref="dfltattrs"/>
</xs:complexType>
</xs:element>
<xs:element name="legal-event">
<xs:complexType>
<xs:choice minOccurs="0">
<xs:element ref="dtext"/>
<xs:element ref="legal-event-body"/>
</xs:choice>
<xs:attributeGroup ref="dfltattrs"/>
<xs:attribute name="code" use="required"/>
<xs:attribute name="country" use="required"/>
<xs:attribute name="date" use="required"/>
<xs:attribute name="impact"/>
<xs:attribute name="class"/>
</xs:complexType>
</xs:element>
<xs:element name="legal-event-body">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" ref="event-title"/>
<xs:element minOccurs="0" ref="event-attributes"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="event-title" type="xs:string"/>
<xs:element name="event-attributes">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="event-attribute"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="event-attribute">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="event-attribute-label"/>
<xs:element ref="event-attribute-value"/>
</xs:choice>
</xs:complexType>
</xs:element>
<xs:element name="event-attribute-label" type="xs:string"/>
<xs:element name="event-attribute-value" type="xs:string"/>
<!-- currently unused -->
<xs:element name="extended-patent-family">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="patent-family"/>
</xs:sequence>
<xs:attributeGroup ref="dfltattrs"/>
</xs:complexType>
</xs:element>
<xs:element name="patent-family">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="publication-reference"/>
</xs:sequence>
<xs:attributeGroup ref="dfltattrs"/>
<xs:attribute name="family-id" use="required"/>
</xs:complexType>
</xs:element>
<!-- Revision History -->
<xs:element name="revision-history">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="revision"/>
</xs:sequence>
<xs:attribute name="id"/>
</xs:complexType>
</xs:element>
<xs:element name="revision">
<xs:complexType>
<xs:sequence>
<xs:element ref="previous-value"/>
<xs:element ref="current-value"/>
</xs:sequence>
<xs:attributeGroup ref="dfltattrs"/>
</xs:complexType>
</xs:element>
<xs:element name="previous-value" type="xs:string"/>
<xs:element name="current-value" type="xs:string"/>
<xs:element name="copyright">
<xs:complexType mixed="true">
<xs:attribute name="copyright-id"/>
</xs:complexType>
</xs:element>
<!--
Data issues: these are produced on-demand and
are currently not part of the standard XML data
generation
-->
<xs:element name="data-issues">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="data-issue"/>
</xs:sequence>
<xs:attributeGroup ref="dfltattrs"/>
</xs:complexType>
</xs:element>
<xs:element name="data-issue">
<xs:complexType>
<xs:sequence>
<xs:element ref="data-issue-level"/>
<xs:element ref="data-issue-description"/>
</xs:sequence>
<xs:attributeGroup ref="dfltattrs"/>
</xs:complexType>
</xs:element>
<xs:element name="data-issue-level" type="xs:string"/>
<xs:element name="data-issue-description" type="xs:string"/>
<!--
Limitations and Petitions
See: http://www.epo.org/patents/law/legal-texts/html/epc/2000/e/contents.html
-->
<xs:element name="ep-limitations">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="ep-limitation-procedure"/>
</xs:sequence>
<xs:attributeGroup ref="dfltattrs"/>
</xs:complexType>
</xs:element>
<xs:element name="ep-limitation-procedure">
<xs:complexType>
<xs:sequence>
<xs:element ref="ep-limitation-filing"/>
<xs:element minOccurs="0" ref="ep-limitation-rejection"/>
<xs:element minOccurs="0" ref="ep-limitation-allowed"/>
<xs:element minOccurs="0" ref="ep-limitation-decision"/>
</xs:sequence>
<xs:attributeGroup ref="dfltattrs"/>
<xs:attribute name="limitation-sequence"/>
</xs:complexType>
</xs:element>
<xs:element name="ep-limitation-filing">
<xs:complexType>
<xs:sequence>
<xs:element ref="ep-limitation-date"/>
<xs:element ref="ep-limitation-filing-kind"/>
<xs:element ref="ep-limitation-filing-decision"/>
<xs:element ref="ep-limitation-payment-date"/>
</xs:sequence>
<xs:attributeGroup ref="dfltattrs"/>
</xs:complexType>
</xs:element>
<xs:element name="ep-limitation-date">
<xs:complexType>
<xs:sequence>
<xs:element ref="date"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<!--
01 = filed during oppoistion
02 = filed after opposition
-->
<xs:element name="ep-limitation-filing-kind" type="xs:string"/>
<!--
01 = admissible
02 = inadmissible
03 = deemed not filed
04 = deemed not filed, opposition pending
05 = withdrawn
-->
<xs:element name="ep-limitation-filing-decision" type="xs:string"/>
<xs:element name="ep-limitation-payment-date">
<xs:complexType>
<xs:sequence>
<xs:element ref="date"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="ep-limitation-rejection">
<xs:complexType>
<xs:sequence>
<xs:element ref="ep-limitation-rejection-kind"/>
<xs:element ref="ep-limitation-rejection-dispatch-date"/>
<xs:element ref="ep-limitation-rejection-legal-date"/>
<xs:element ref="ep-limitation-rejection-bulletin-number"/>
</xs:sequence>
<xs:attributeGroup ref="dfltattrs"/>
</xs:complexType>
</xs:element>
<!--
01 = substantive refusal
02 = inadmissible for formal reasons (R.94)
03 = no (late) reply to subset report
04 = RALL (request allowed) requirements not fulfilled
-->
<xs:element name="ep-limitation-rejection-kind" type="xs:string"/>
<xs:element name="ep-limitation-rejection-dispatch-date">
<xs:complexType>
<xs:sequence>
<xs:element ref="date"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="ep-limitation-rejection-legal-date">
<xs:complexType>
<xs:sequence>
<xs:element ref="date"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="ep-limitation-rejection-bulletin-number">
<xs:complexType>
<xs:sequence>
<xs:element ref="bnum"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="ep-limitation-allowed">
<xs:complexType>
<xs:sequence>
<xs:element ref="ep-limitation-allowed-dispatch-date"/>
<xs:element ref="ep-limitation-allowed-trans-date"/>
<xs:element ref="ep-limitation-allowed-payment-date"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="ep-limitation-allowed-dispatch-date">
<xs:complexType>
<xs:sequence>
<xs:element ref="date"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="ep-limitation-allowed-trans-date">
<xs:complexType>
<xs:sequence>
<xs:element ref="date"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="ep-limitation-allowed-payment-date">
<xs:complexType>
<xs:sequence>
<xs:element ref="date"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="ep-limitation-decision">
<xs:complexType>
<xs:sequence>
<xs:element ref="kind"/>
<xs:element ref="date"/>
<xs:element ref="bnum"/>
</xs:sequence>
<xs:attributeGroup ref="dfltattrs"/>
<xs:attribute name="limitation-sequence"/>
</xs:complexType>
</xs:element>
<!-- ep-petition-reviews -->
<xs:element name="ep-petition-reviews">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="ep-petition-review"/>
</xs:sequence>
<xs:attributeGroup ref="dfltattrs"/>
</xs:complexType>
</xs:element>
<xs:element name="ep-petition-review">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" ref="ep-petition-review-appeal-number"/>
<xs:element minOccurs="0" ref="ep-petition-review-petitioner-code"/>
<xs:element minOccurs="0" ref="ep-petition-review-notice-date"/>
<xs:element minOccurs="0" ref="ep-petition-review-decision-date"/>
<xs:element minOccurs="0" ref="ep-petition-review-decision-kind"/>
</xs:sequence>
<xs:attributeGroup ref="dfltattrs"/>
<xs:attribute name="review-number" use="required"/>
</xs:complexType>
</xs:element>
<!-- @review-number: Comprises a unique number for a given year. Eg R0001/08 -->
<xs:element name="ep-petition-review-appeal-number" type="xs:string"/>
<xs:element name="ep-petition-review-petitioner-code" type="xs:string"/>
<xs:element name="ep-petition-review-notice-date">
<xs:complexType>
<xs:sequence>
<xs:element ref="date"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="ep-petition-review-decision-date">
<xs:complexType>
<xs:sequence>
<xs:element ref="date"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="ep-petition-review-decision-kind" type="xs:string"/>
<!-- a bulletin number -->
<xs:element name="bnum" type="xs:string"/>
<xs:element name="figure">
<xs:complexType>
<xs:sequence>
<xs:element ref="img"/>
</xs:sequence>
<xs:attribute name="id"/>
<xs:attribute name="num" use="required"/>
<xs:attribute name="figure-labels"/>
</xs:complexType>
</xs:element>
<xs:element name="heading">
<xs:complexType mixed="true">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:group ref="btext"/>
<xs:element ref="st32math"/>
<xs:element ref="st32chem"/>
</xs:choice>
<xs:attribute name="id"/>
<xs:attribute name="num"/>
</xs:complexType>
</xs:element>
<xs:element name="p">
<xs:complexType mixed="true">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:group ref="ptext"/>
<xs:element ref="st32chem"/>
<xs:element ref="st32math"/>
</xs:choice>
<xs:attribute name="id"/>
<xs:attribute name="num"/>
</xs:complexType>
</xs:element>
<!--
img/imgref in these content models is required to satisfy
custom characters represented as images
-->
<xs:element name="b">
<xs:complexType mixed="true">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="i"/>
<xs:element ref="u"/>
<xs:element ref="o"/>
<xs:element ref="sub"/>
<xs:element ref="sup"/>
<xs:element ref="smallcaps"/>
<xs:element ref="img"/>
<xs:element ref="imgref"/>
</xs:choice>
</xs:complexType>
</xs:element>
<xs:element name="i">
<xs:complexType mixed="true">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="b"/>
<xs:element ref="u"/>
<xs:element ref="o"/>
<xs:element ref="sub"/>
<xs:element ref="sup"/>
<xs:element ref="smallcaps"/>
<xs:element ref="img"/>
<xs:element ref="imgref"/>
</xs:choice>
</xs:complexType>
</xs:element>
<xs:element name="u">
<xs:complexType mixed="true">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="b"/>
<xs:element ref="i"/>
<xs:element ref="o"/>
<xs:element ref="sub"/>
<xs:element ref="sup"/>
<xs:element ref="smallcaps"/>
<xs:element ref="img"/>
<xs:element ref="imgref"/>
</xs:choice>
<xs:attribute name="style" default="single">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="single"/>
<xs:enumeration value="double"/>
<xs:enumeration value="dash"/>
<xs:enumeration value="dots"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="o">
<xs:complexType mixed="true">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="b"/>
<xs:element ref="i"/>
<xs:element ref="u"/>
<xs:element ref="sub"/>
<xs:element ref="sup"/>
<xs:element ref="smallcaps"/>
<xs:element ref="img"/>
<xs:element ref="imgref"/>
</xs:choice>
<xs:attribute name="ostyle" default="single">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="single"/>
<xs:enumeration value="double"/>
<xs:enumeration value="dash"/>
<xs:enumeration value="dots"/>
<xs:enumeration value="leftarrow"/>
<xs:enumeration value="rightarrow"/>
<xs:enumeration value="leftrightarriw"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="sub">
<xs:complexType mixed="true">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="b"/>
<xs:element ref="i"/>
<xs:element ref="u"/>
<xs:element ref="o"/>
<xs:element ref="sub"/>
<xs:element ref="sup"/>
<xs:element ref="smallcaps"/>
<xs:element ref="sub2"/>
<xs:element ref="sup2"/>
<xs:element ref="img"/>
<xs:element ref="imgref"/>
</xs:choice>
</xs:complexType>
</xs:element>
<xs:element name="sub2">
<xs:complexType mixed="true">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="b"/>
<xs:element ref="i"/>
<xs:element ref="u"/>
<xs:element ref="o"/>
<xs:element ref="sub"/>
<xs:element ref="sup"/>
<xs:element ref="smallcaps"/>
<xs:element ref="sup2"/>
<xs:element ref="img"/>
<xs:element ref="imgref"/>
</xs:choice>
</xs:complexType>
</xs:element>
<xs:element name="sup">
<xs:complexType mixed="true">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="b"/>
<xs:element ref="i"/>
<xs:element ref="u"/>
<xs:element ref="o"/>
<xs:element ref="sub"/>
<xs:element ref="smallcaps"/>
<xs:element ref="sub2"/>
<xs:element ref="sup2"/>
<xs:element ref="img"/>
<xs:element ref="imgref"/>
</xs:choice>
</xs:complexType>
</xs:element>
<xs:element name="sup2">
<xs:complexType mixed="true">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="b"/>
<xs:element ref="i"/>
<xs:element ref="u"/>
<xs:element ref="o"/>
<xs:element ref="sub"/>
<xs:element ref="sup"/>
<xs:element ref="smallcaps"/>
<xs:element ref="sub2"/>
<xs:element ref="img"/>
<xs:element ref="imgref"/>
</xs:choice>
</xs:complexType>
</xs:element>
<xs:element name="smallcaps">
<xs:complexType mixed="true">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="b"/>
<xs:element ref="i"/>
<xs:element ref="u"/>
<xs:element ref="o"/>
<xs:element ref="sub"/>
<xs:element ref="sup"/>
<xs:element ref="sub2"/>
<xs:element ref="sup2"/>
<xs:element ref="img"/>
<xs:element ref="imgref"/>
</xs:choice>
</xs:complexType>
</xs:element>
<xs:element name="br">
<xs:complexType/>
</xs:element>
<!-- unformatted text (white space retained etc... ) -->
<xs:element name="pre">
<xs:complexType mixed="true">
<xs:attribute ref="xml:space"/>
<xs:attribute name="listing-type" use="required">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="tabular"/>
<xs:enumeration value="equation"/>
<xs:enumeration value="sequence"/>
<xs:enumeration value="program-listing"/>
<xs:enumeration value="other"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
<!-- Lists -->
<xs:element name="dl">
<xs:complexType>
<xs:sequence maxOccurs="unbounded">
<xs:element ref="dt"/>
<xs:element ref="dd"/>
</xs:sequence>
<xs:attribute name="id"/>
<xs:attribute name="tsize"/>
<xs:attribute name="compact">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="compact"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="dt">
<xs:complexType mixed="true">
<xs:group minOccurs="0" maxOccurs="unbounded" ref="btext"/>
<xs:attribute name="id"/>
</xs:complexType>
</xs:element>
<xs:element name="dd">
<xs:complexType mixed="true">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:group ref="ptext"/>
<xs:element ref="st32chem"/>
<xs:element ref="st32math"/>
</xs:choice>
<xs:attribute name="id"/>
</xs:complexType>
</xs:element>
<xs:element name="ul">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="li"/>
</xs:sequence>
<xs:attribute name="id"/>
<xs:attribute name="list-style" default="bullet">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="bullet"/>
<xs:enumeration value="dash"/>
<xs:enumeration value="none"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="compact">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="compact"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="sl">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="li"/>
</xs:sequence>
<xs:attribute name="id"/>
<xs:attribute name="compact">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="compact"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="ol">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="li"/>
</xs:sequence>
<xs:attribute name="id"/>
<xs:attribute name="ol-style"/>
<xs:attribute name="compact">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="compact"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="li">
<xs:complexType mixed="true">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:group ref="ptext"/>
<xs:element ref="st32chem"/>
<xs:element ref="st32math"/>
</xs:choice>
<xs:attribute name="id"/>
<xs:attribute name="num"/>
</xs:complexType>
</xs:element>
<xs:element name="crossref">
<xs:complexType mixed="true">
<xs:group minOccurs="0" maxOccurs="unbounded" ref="btext"/>
<xs:attribute name="idref" use="required"/>
</xs:complexType>
</xs:element>
<xs:element name="figref">
<xs:complexType mixed="true">
<xs:group minOccurs="0" maxOccurs="unbounded" ref="btext"/>
<xs:attribute name="idrefs"/>
<xs:attribute name="num"/>
</xs:complexType>
</xs:element>
<xs:element name="bio-deposit">
<xs:complexType>
<xs:sequence>
<xs:element ref="depositary"/>
<xs:element ref="bio-accno"/>
<xs:element minOccurs="0" ref="date"/>
<xs:element minOccurs="0" ref="term"/>
<xs:element minOccurs="0" ref="dtext"/>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"/>
<xs:attribute name="num" use="required"/>
<xs:attribute name="url"/>
<xs:attribute name="dnum"/>
</xs:complexType>
</xs:element>
<!-- Information regarding the facility storing the biological deposit. -->
<xs:element name="depositary">
<xs:complexType mixed="true">
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="address"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<!-- Biological accession number: the identification assigned to the biological material by the depository. -->
<xs:element name="bio-accno" type="xs:string"/>
<xs:element name="term" type="xs:string"/>
<xs:element name="img">
<xs:complexType>
<xs:attribute name="id"/>
<xs:attribute name="file" use="required"/>
<xs:attribute name="wi"/>
<xs:attribute name="he"/>
<xs:attribute name="img-content" default="drawing">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="abstract-drawing"/>
<xs:enumeration value="ad"/>
<xs:enumeration value="chem"/>
<xs:enumeration value="cf"/>
<xs:enumeration value="clip"/>
<xs:enumeration value="ci"/>
<xs:enumeration value="program-listing"/>
<xs:enumeration value="cp"/>
<xs:enumeration value="dna"/>
<xs:enumeration value="dn"/>
<xs:enumeration value="drawing"/>
<xs:enumeration value="dr"/>
<xs:enumeration value="undefined"/>
<xs:enumeration value="figure"/>
<xs:enumeration value="fg"/>
<xs:enumeration value="graph"/>
<xs:enumeration value="gr"/>
<xs:enumeration value="math"/>
<xs:enumeration value="mf"/>
<xs:enumeration value="page"/>
<xs:enumeration value="pa"/>
<xs:enumeration value="photograph"/>
<xs:enumeration value="ph"/>
<xs:enumeration value="search-report"/>
<xs:enumeration value="sr"/>
<xs:enumeration value="table"/>
<xs:enumeration value="tb"/>
<xs:enumeration value="character"/>
<xs:enumeration value="tx"/>
<xs:enumeration value="flowchart"/>
<xs:enumeration value="undefined-char"/>
<xs:enumeration value="ff"/>
<xs:enumeration value="undefined-image"/>
<xs:enumeration value="ui"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="img-format" use="required">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="jpg"/>
<xs:enumeration value="tif"/>
<xs:enumeration value="st33"/>
<xs:enumeration value="st35"/>
<xs:enumeration value="pdf"/>
<xs:enumeration value="gif"/>
<xs:enumeration value="bmp"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="orientation" default="unknown">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="portrait"/>
<xs:enumeration value="landscape"/>
<xs:enumeration value="unknown"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="inline" default="no">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="yes"/>
<xs:enumeration value="no"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="alt"/>
<xs:attribute name="url"/>
</xs:complexType>
</xs:element>
<xs:element name="imgref">
<xs:complexType>
<xs:attribute name="idrefs"/>
<xs:attribute name="num"/>
</xs:complexType>
</xs:element>
<xs:element name="attachments">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="attachment"/>
</xs:sequence>
<xs:attributeGroup ref="dfltattrs"/>
</xs:complexType>
</xs:element>
<xs:element name="attachments-external">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="attachment"/>
</xs:sequence>
<xs:attributeGroup ref="dfltattrs"/>
</xs:complexType>
</xs:element>
<xs:element name="attachment">
<xs:complexType>
<xs:attribute name="idref"/>
<xs:attribute name="attachment-type" use="required">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="pdf"/>
<xs:enumeration value="cdx"/>
<xs:enumeration value="mol"/>
<xs:enumeration value="nb"/>
<xs:enumeration value="xml"/>
<xs:enumeration value="seq-xml"/>
<xs:enumeration value="table-xml"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="file" use="required"/>
</xs:complexType>
</xs:element>
<xs:element name="formula-text">
<xs:complexType mixed="true">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="b"/>
<xs:element ref="i"/>
<xs:element ref="u"/>
<xs:element ref="o"/>
<xs:element ref="sup"/>
<xs:element ref="sub"/>
<xs:element ref="smallcaps"/>
</xs:choice>
</xs:complexType>
</xs:element>
<xs:element name="chemistry">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="img"/>
<xs:element ref="formula-text"/>
<xs:element ref="attachments"/>
</xs:choice>
<xs:attribute name="id"/>
<xs:attribute name="num"/>
</xs:complexType>
</xs:element>
<xs:element name="maths">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="math"/>
<xs:element ref="equation"/>
<xs:element ref="img"/>
<xs:element ref="formula-text"/>
<xs:element ref="attachments"/>
</xs:choice>
<xs:attribute name="id"/>
<xs:attribute name="num"/>
</xs:complexType>
</xs:element>
<!-- equation added to support US greenbook -->
<xs:element name="equation" type="xs:string"/>
<xs:element name="tables">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="table"/>
<xs:element ref="img"/>
</xs:choice>
<xs:attribute name="id"/>
<xs:attribute name="num"/>
</xs:complexType>
</xs:element>
<xs:element name="table-external-doc" type="xs:string"/>
<xs:element name="number" type="xs:string"/>
</xs:schema>
Hi, I was wondering what the difference(s) are between this project and xgen
. This project is of course much younger, and it doesn't appear that you intend to generate code for languages other than Go, but I can't tell from looking at the READMEs and your blog post whether you have a specific goal that xgen
doesn't meet.
I have a set of XSD files I'd like to convert that reference each other, i.e. entity or type defined in one file and used in other file. Is there any way to handle such situation easily?
I've tried combining the XSDs but without success:
<?xml version="1.0"?>
<xs:schema xmlns:ns_p="http://docs.eebus.org/spine/xsd/v1" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://docs.eebus.org/spine/xsd/v1" version="1.1.1"
blockDefault="#all" elementFormDefault="qualified">
<xs:import schemaLocation="../evcc-docs/eebus/EEBus_SPINE_V1.1.1_final_hp/XSDs/EEBus_SPINE_TS_CommonDataTypes.xsd" />
<xs:import schemaLocation="../evcc-docs/eebus/EEBus_SPINE_V1.1.1_final_hp/XSDs/EEBus_SPINE_TS_CommandCommonDefinitions.xsd" />
...
only leads to import issues although the relevant definition is part of the included files:
Processing 'combined.xsd'
Parsing: combined.xsd
Parsing: ../evcc-docs/eebus/EEBus_SPINE_V1.1.1_final_hp/XSDs/EEBus_SPINE_TS_CommonDataTypes.xsd
Parsing: ../evcc-docs/eebus/EEBus_SPINE_V1.1.1_final_hp/XSDs/EEBus_SPINE_TS_CommandCommonDefinitions.xsd
Parsing: ../evcc-docs/eebus/EEBus_SPINE_V1.1.1_final_hp/XSDs/EEBus_SPINE_TS_ActuatorLevel.xsd
panic: Cannot resolve type reference: ns_p:ScaledNumberType
I am trying to convert the Grobid xsd files but I get a panic. Any help appreciated.
gocomply_xsd2go convert ./grobid/grobid-home/schemas/xsd/Grobid.xsd github.com/jgoodall/server/pkg/extraction/grobid/schema ./pkg/extraction/grobid/schema
Processing './grobid/grobid-home/schemas/xsd/Grobid.xsd'
Parsing: ./grobid/grobid-home/schemas/xsd/Grobid.xsd
Parsing: grobid/grobid-home/schemas/xsd/xml.xsd
Parsing: grobid/grobid-home/schemas/xsd/Grobid.xsd
panic: Type xsd:Name not implemented
goroutine 1 [running]:
github.com/gocomply/xsd2go/pkg/xsd.StaticType(...)
/Users/ojg/code/go/pkg/mod/github.com/gocomply/[email protected]/pkg/xsd/types.go:293
github.com/gocomply/xsd2go/pkg/xsd.(*Schema).findReferencedType(0x1400029c780, {0x140003ef478, 0x7})
/Users/ojg/code/go/pkg/mod/github.com/gocomply/[email protected]/pkg/xsd/schema.go:97 +0x2e8
github.com/gocomply/xsd2go/pkg/xsd.(*Attribute).compile(0x1400049cbd0, 0x140001f8d98?)
/Users/ojg/code/go/pkg/mod/github.com/gocomply/[email protected]/pkg/xsd/attribute.go:97 +0xac
github.com/gocomply/xsd2go/pkg/xsd.(*ComplexType).compile(0x140000f73b0, 0x1400029c780, 0x1400040a140)
/Users/ojg/code/go/pkg/mod/github.com/gocomply/[email protected]/pkg/xsd/types.go:124 +0x104
github.com/gocomply/xsd2go/pkg/xsd.(*Element).compile(0x1400040a140, 0x14000324e40?, 0x0)
/Users/ojg/code/go/pkg/mod/github.com/gocomply/[email protected]/pkg/xsd/element.go:137 +0xa0
github.com/gocomply/xsd2go/pkg/xsd.(*Schema).compile(0x1400029c780)
/Users/ojg/code/go/pkg/mod/github.com/gocomply/[email protected]/pkg/xsd/schema.go:56 +0x50
github.com/gocomply/xsd2go/pkg/xsd.(*Workspace).loadXsd(0x1400022c5c0, {0x140004884b0, 0x29}, 0x1)
/Users/ojg/code/go/pkg/mod/github.com/gocomply/[email protected]/pkg/xsd/workspace.go:95 +0xa54
github.com/gocomply/xsd2go/pkg/xsd.(*Import).load(0x1400027e0a0, 0x1400022c5c0, {0x140004883c0?, 0x26?})
/Users/ojg/code/go/pkg/mod/github.com/gocomply/[email protected]/pkg/xsd/schema.go:301 +0x7c
github.com/gocomply/xsd2go/pkg/xsd.(*Workspace).loadXsd(0x1400022c5c0, {0x140004883c0, 0x26}, 0x1)
/Users/ojg/code/go/pkg/mod/github.com/gocomply/[email protected]/pkg/xsd/workspace.go:91 +0xa30
github.com/gocomply/xsd2go/pkg/xsd.(*Import).load(0x1400027e050, 0x1400022c5c0, {0x14000498040?, 0x2b?})
/Users/ojg/code/go/pkg/mod/github.com/gocomply/[email protected]/pkg/xsd/schema.go:301 +0x7c
github.com/gocomply/xsd2go/pkg/xsd.(*Workspace).loadXsd(0x1400022c5c0, {0x16d0af6a8, 0x2b}, 0x1)
/Users/ojg/code/go/pkg/mod/github.com/gocomply/[email protected]/pkg/xsd/workspace.go:91 +0xa30
github.com/gocomply/xsd2go/pkg/xsd.NewWorkspace({0x1400023d2c0, 0x5c}, {0x16d0af6a8, 0x2b}, {0x103416dc0, 0x0, 0x0})
/Users/ojg/code/go/pkg/mod/github.com/gocomply/[email protected]/pkg/xsd/workspace.go:27 +0xf0
github.com/gocomply/xsd2go/pkg/xsd2go.Convert({0x16d0af6a8, 0x2b}, {0x16d0af6d4, 0x3d}, {0x16d0af712, 0x1e}, {0x103416dc0, 0x0, 0x0})
/Users/ojg/code/go/pkg/mod/github.com/gocomply/[email protected]/pkg/xsd2go/generate.go:12 +0xf8
github.com/gocomply/xsd2go/cli/cmd.init.func2(0x140001976b8?)
/Users/ojg/code/go/pkg/mod/github.com/gocomply/[email protected]/cli/cmd/cmd.go:44 +0xa8
github.com/urfave/cli.HandleAction({0x1030943a0?, 0x1030f5ad0?}, 0x7?)
/Users/ojg/code/go/pkg/mod/github.com/urfave/[email protected]/app.go:524 +0x58
github.com/urfave/cli.Command.Run({{0x102fdd708, 0x7}, {0x0, 0x0}, {0x0, 0x0, 0x0}, {0x102ff57d3, 0x44}, {0x0, ...}, ...}, ...)
/Users/ojg/code/go/pkg/mod/github.com/urfave/[email protected]/command.go:175 +0x534
github.com/urfave/cli.(*App).Run(0x1400027c380, {0x140000120a0, 0x5, 0x5})
/Users/ojg/code/go/pkg/mod/github.com/urfave/[email protected]/app.go:277 +0x7f8
github.com/gocomply/xsd2go/cli/cmd.Execute()
/Users/ojg/code/go/pkg/mod/github.com/gocomply/[email protected]/cli/cmd/cmd.go:21 +0x114
main.main()
/Users/ojg/code/go/pkg/mod/github.com/gocomply/[email protected]/cli/gocomply_xsd2go/main.go:8 +0x1c
Seems it's currently not implemented.
It would be good to export all types which are used for exported types. Otherwise iam not able to use them in own functions, even tho they are available.
type reference string
is used everywhere.
Hi,
I have a set of XSD files that references/imports schemas from each other.
For instance:
==> DATEXII_3_D2Payload.xsd <==
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<xs:schema elementFormDefault="qualified" attributeFormDefault="unqualified" xmlns:d2="http://datex2.eu/schema/3/d2Payload" version="3.4" targetNamespace="http://datex2.eu/schema/3/d2Payload" xmlns:com="http://datex2.eu/schema/3/common" xmlns:loc="http://datex2.eu/schema/3/locationReferencing" xmlns:egi="http://datex2.eu/schema/3/energyInfrastructure" xmlns:fac="http://datex2.eu/schema/3/facilities" xmlns:prk="http://datex2.eu/schema/3/parking" xmlns:locx="http://datex2.eu/schema/3/locationExtension" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:import namespace="http://datex2.eu/schema/3/locationExtension" schemaLocation="DATEXII_3_LocationExtension.xsd" />
<xs:import namespace="http://datex2.eu/schema/3/parking" schemaLocation="DATEXII_3_Parking.xsd" />
<xs:import namespace="http://datex2.eu/schema/3/facilities" schemaLocation="DATEXII_3_Facilities.xsd" />
<xs:import namespace="http://datex2.eu/schema/3/energyInfrastructure" schemaLocation="DATEXII_3_EnergyInfrastructure.xsd" />
<xs:import namespace="http://datex2.eu/schema/3/locationReferencing" schemaLocation="DATEXII_3_LocationReferencing.xsd" />
<xs:import namespace="http://datex2.eu/schema/3/common" schemaLocation="DATEXII_3_Common.xsd" />
==> DATEXII_3_Parking.xsd <==
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<xs:schema elementFormDefault="qualified" attributeFormDefault="unqualified" xmlns:prk="http://datex2.eu/schema/3/parking" version="1" targetNamespace="http://datex2.eu/schema/3/parking" xmlns:com="http://datex2.eu/schema/3/common" xmlns:fac="http://datex2.eu/schema/3/facilities" xmlns:loc="http://datex2.eu/schema/3/locationReferencing" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:import namespace="http://datex2.eu/schema/3/locationReferencing" schemaLocation="DATEXII_3_LocationReferencing.xsd" />
<xs:import namespace="http://datex2.eu/schema/3/facilities" schemaLocation="DATEXII_3_Facilities.xsd" />
<xs:import namespace="http://datex2.eu/schema/3/common" schemaLocation="DATEXII_3_Common.xsd" />
I tried:
$ gocomply_xsd2go convert DATEXII_3_D2Payload.xsd datex3 .
Processing 'DATEXII_3_D2Payload.xsd'
Parsing: DATEXII_3_D2Payload.xsd
Parsing: DATEXII_3_LocationExtension.xsd
Parsing: DATEXII_3_Common.xsd
Parsing: DATEXII_3_Facilities.xsd
Parsing: DATEXII_3_EnergyInfrastructure.xsd
Parsing: DATEXII_3_LocationReferencing.xsd
runtime: goroutine stack exceeds 1000000000-byte limit
runtime: sp=0xc020596320 stack=[0xc020596000, 0xc040596000]
fatal error: stack overflow
The same schema is available in json where go-jsonschema -p datex3 DATEXII_3_Parking.json
reports a cycle.
Does the tool detect circular dependencies?
Or what can be another reason for this stack overflow?
Any tips to find the cause for the stack overflow?
Thanks in advance!
Best,
Denise
probably related: #21
panic: Type xsd:duration not implemented
goroutine 1 [running]:
github.com/gocomply/xsd2go/pkg/xsd.StaticType(...)
/home/alex/go/pkg/mod/github.com/gocomply/[email protected]/pkg/xsd/types.go:293
Happens on
<xs:element minOccurs="0" name="waiting" type="xs:unsignedInt"/>
Could you give a hint where I should start looking into the code?
Trying to generate the NIST SWID extensions, and nothing gets generated. Not sure why...
Command output:
./gocomply_xsd2go convert swid-2015-extensions-1.0.xsd github.com/gocomply/swuid swid
Processing 'swid-2015-extensions-1.0.xsd'
Parsing: swid-2015-extensions-1.0.xsd
While processing nested XSD (all ISO-8859-1) i get the following error.
Error decoding XSD: xml: encoding "ISO-8859-1" declared but Decoder.CharsetReader is nil
with some time or some hints where to search i'm happy to add a PR to fix this.
Tested with the profile definition of Cisco AnyConnect Secure Mobility Client Version 4.10.03104.
Steps to reproduce:
~/go/bin/gocomply_xsd2go convert AnyConnectProfile.xsd xsd .
generates ./ns1/models.go
ClientInitialization
is emptyExpected: struct ClientInitialization
should contain all defined child elements, e.g. UseStartBeforeLogon
.
More generally, expected result is either of:
N.b.: It seems that the second argument to gocomply_xsd2go
has neither effect nor documentation. Initially I had github.com/gocomply/scap
in there as per README.md . I changed it to xsd
to see what would happen.
When parsing pacs.008.001.09.xsd
from the ISO 20022 standards. (FIToFICustomerCreditTransferV10
)
goroutine 1 [running]:
github.com/gocomply/xsd2go/pkg/xsd.StaticType(...)
/Users/adam/code/pkg/mod/github.com/gocomply/[email protected]/pkg/xsd/types.go:259
github.com/gocomply/xsd2go/pkg/xsd.(*Schema).findReferencedType(0xc0001bcc80, {0xc0002cb3d0, 0x7})
/Users/adam/code/pkg/mod/github.com/gocomply/[email protected]/pkg/xsd/schema.go:94 +0x2f9
github.com/gocomply/xsd2go/pkg/xsd.(*Restriction).compile(0xc0001fbb00, 0xc0001bcc80, 0x118637e?)
/Users/adam/code/pkg/mod/github.com/gocomply/[email protected]/pkg/xsd/restriction.go:31 +0xe5
github.com/gocomply/xsd2go/pkg/xsd.(*SimpleType).compile(...)
/Users/adam/code/pkg/mod/github.com/gocomply/[email protected]/pkg/xsd/types.go:179
github.com/gocomply/xsd2go/pkg/xsd.(*Schema).compile(0xc0001bcc80)
/Users/adam/code/pkg/mod/github.com/gocomply/[email protected]/pkg/xsd/schema.go:65 +0x1b7
github.com/gocomply/xsd2go/pkg/xsd.(*Workspace).loadXsd(0xc0001b25a0, {0x7ff7bfeff490, 0x19}, 0x1)
/Users/adam/code/pkg/mod/github.com/gocomply/[email protected]/pkg/xsd/workspace.go:86 +0xda9
github.com/gocomply/xsd2go/pkg/xsd.NewWorkspace({0xc0001b87c0, 0x1d}, {0x7ff7bfeff490, 0x19}, {0x15ce3c0, 0x0, 0x0})
/Users/adam/code/pkg/mod/github.com/gocomply/[email protected]/pkg/xsd/workspace.go:27 +0xfc
github.com/gocomply/xsd2go/pkg/xsd2go.Convert({0x7ff7bfeff490, 0x19}, {0x7ff7bfeff4aa, 0x1a}, {0x7ff7bfeff4c5, 0x2}, {0x15ce3c0, 0x0, 0x0})
/Users/adam/code/pkg/mod/github.com/gocomply/[email protected]/pkg/xsd2go/generate.go:12 +0x15a
github.com/gocomply/xsd2go/cli/cmd.glob..func2(0xc0001c8dc0?)
/Users/adam/code/pkg/mod/github.com/gocomply/[email protected]/cli/cmd/cmd.go:44 +0xd1
github.com/urfave/cli.HandleAction({0x12d1740?, 0x135f420?}, 0x7?)
/Users/adam/code/pkg/mod/github.com/urfave/[email protected]/app.go:524 +0x50
github.com/urfave/cli.Command.Run({{0x132b381, 0x7}, {0x0, 0x0}, {0x0, 0x0, 0x0}, {0x134176d, 0x44}, {0x0, ...}, ...}, ...)
/Users/adam/code/pkg/mod/github.com/urfave/[email protected]/command.go:173 +0x65b
github.com/urfave/cli.(*App).Run(0xc0001c0700, {0xc0000160a0, 0x5, 0x5})
/Users/adam/code/pkg/mod/github.com/urfave/[email protected]/app.go:277 +0x8c7
github.com/gocomply/xsd2go/cli/cmd.Execute()
/Users/adam/code/pkg/mod/github.com/gocomply/[email protected]/cli/cmd/cmd.go:21 +0x134
main.main()
/Users/adam/code/pkg/mod/github.com/gocomply/[email protected]/cli/gocomply_xsd2go/main.go:8 +0x19
I'm running into an issue when trying to generate a binding for a fairly simple XSD. Should xsd:int
or xsd:integer
be supported by now?
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:simple-schema="https://simple.example.com/"
targetNamespace="https://simple.example.com/"
elementFormDefault="qualified">
<xsd:element name="myelement" type="simple-schema:MyElementType" />
<xsd:complexType name="MyElementType">
<xsd:sequence>
<xsd:element name="id" type="xsd:integer" />
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
/home/pi/go/bin/gocomply_xsd2go convert simple.xsd simple.example.com/1.0 go
Processing 'simple.xsd'
Parsing: simple.xsd
panic: Type xsd:integer not implemented
goroutine 1 [running]:
github.com/gocomply/xsd2go/pkg/xsd.StaticType(...)
/home/pi/go/src/github.com/gocomply/xsd2go/pkg/xsd/types.go:192
github.com/gocomply/xsd2go/pkg/xsd.(*Schema).findReferencedType(0x1d42380, 0x1ec3270, 0xb, 0x659c0458, 0x4f2520)
/home/pi/go/src/github.com/gocomply/xsd2go/pkg/xsd/schema.go:87 +0x5bc
github.com/gocomply/xsd2go/pkg/xsd.(*Element).compile(0x1d3cfc0, 0x1d42380, 0x0)
/home/pi/go/src/github.com/gocomply/xsd2go/pkg/xsd/element.go:134 +0x1c8
github.com/gocomply/xsd2go/pkg/xsd.(*Sequence).compile(0x1ee0d80, 0x1d42380, 0x0)
/home/pi/go/src/github.com/gocomply/xsd2go/pkg/xsd/sequence.go:21 +0x48
github.com/gocomply/xsd2go/pkg/xsd.(*ComplexType).compile(0x1d2e7d0, 0x1d42380, 0x0)
/home/pi/go/src/github.com/gocomply/xsd2go/pkg/xsd/types.go:73 +0x320
github.com/gocomply/xsd2go/pkg/xsd.(*Schema).compile(0x1d42380)
/home/pi/go/src/github.com/gocomply/xsd2go/pkg/xsd/schema.go:54 +0xa8
github.com/gocomply/xsd2go/pkg/xsd.(*Workspace).loadXsd(0x1d1caf0, 0x7ea61e33, 0xa, 0x0, 0x0, 0x0)
/home/pi/go/src/github.com/gocomply/xsd2go/pkg/xsd/workspace.go:51 +0x2c0
github.com/gocomply/xsd2go/pkg/xsd.NewWorkspace(0x1ede0a0, 0x19, 0x7ea61e33, 0xa, 0x2, 0x1ede0a0, 0x19)
/home/pi/go/src/github.com/gocomply/xsd2go/pkg/xsd/workspace.go:20 +0x6c
github.com/gocomply/xsd2go/pkg/xsd2go.Convert(0x7ea61e33, 0xa, 0x7ea61e3e, 0x16, 0x7ea61e55, 0x2, 0x0, 0x0)
/home/pi/go/src/github.com/gocomply/xsd2go/pkg/xsd2go/generate.go:12 +0x120
github.com/gocomply/xsd2go/cli/cmd.glob..func2(0x1d62840, 0x1d11000, 0x0)
/home/pi/go/src/github.com/gocomply/xsd2go/cli/cmd/cmd.go:33 +0x64
github.com/gocomply/xsd2go/vendor/github.com/urfave/cli.HandleAction(0x2a00e0, 0x32a604, 0x1d62840, 0x1d62840, 0x0)
/home/pi/go/src/github.com/gocomply/xsd2go/vendor/github.com/urfave/cli/app.go:526 +0xe4
github.com/gocomply/xsd2go/vendor/github.com/urfave/cli.Command.Run(0x2e3eac, 0x7, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2f64c7, 0x44, 0x0, ...)
/home/pi/go/src/github.com/gocomply/xsd2go/vendor/github.com/urfave/cli/command.go:174 +0x3f8
github.com/gocomply/xsd2go/vendor/github.com/urfave/cli.(*App).Run(0x1d04c40, 0x1d2c000, 0x5, 0x6, 0x0, 0x0)
/home/pi/go/src/github.com/gocomply/xsd2go/vendor/github.com/urfave/cli/app.go:279 +0x54c
github.com/gocomply/xsd2go/cli/cmd.Execute(0x0, 0x1c000e0)
/home/pi/go/src/github.com/gocomply/xsd2go/cli/cmd/cmd.go:18 +0xdc
main.main()
/home/pi/go/src/github.com/gocomply/xsd2go/cli/gocomply_xsd2go/main.go:8 +0x14
Makefile:12: recipe for target 'generate' failed
make: *** [generate] Error 2
This is also related to issue #51
See definition https://www.oreilly.com/library/view/xml-schema/0596002521/re90.html
With xsd2go 0.1.4:
wget https://gitlab.com/loveshack/sge/-/raw/master/source/dist/util/resources/schemas/qstat/detailed_job_info.xsd
go install github.com/gocomply/xsd2go/cli/gocomply_xsd2go@latest
gocomply_xsd2go convert detailed_job_info.xsd github.com/whoever/whatever my/models/here
Processing 'detailed_job_info.xsd'
Parsing: detailed_job_info.xsd
panic: Type xsd:float not implemented
Hi,
I was trying to go get the package, I get this errors:
C:\Users\user>go get -u -v github.com/gocomply/xsd2go/cli/gocomply_xsd2go
github.com/gocomply/xsd2go (download)
github.com/iancoleman/strcase (download)
github.com/markbates/pkger (download)
github.com/gobuffalo/here (download)
github.com/urfave/cli (download)
github.com/cpuguy83/go-md2man (download)
github.com/cpuguy83/go-md2man/vendor/github.com/shurcooL/sanitized_anchor_name
github.com/iancoleman/strcase
github.com/markbates/pkger/internal/takeon/github.com/markbates/hepa/filters
github.com/cpuguy83/go-md2man/vendor/github.com/russross/blackfriday/v2
github.com/gobuffalo/here
github.com/gocomply/xsd2go/pkg/xsd
github.com/markbates/pkger/here
github.com/markbates/pkger/internal/takeon/github.com/markbates/hepa
github.com/markbates/pkger/pkging
github.com/cpuguy83/go-md2man/md2man
github.com/markbates/pkger/pkging/embed
github.com/markbates/pkger/internal/maps
github.com/urfave/cli
github.com/markbates/pkger/pkging/stdos
github.com/markbates/pkger/pkging/mem
github.com/markbates/pkger
github.com/gocomply/xsd2go/pkg/template
github.com/gocomply/xsd2go/pkg/xsd2go
github.com/gocomply/xsd2go/cli/cmd
# github.com/gocomply/xsd2go/cli/cmd
c:\dev\go\src\github.com\gocomply\xsd2go\cli\cmd\cmd.go:14:15: cannot use []cli.Command literal (type []cli.Command) as type []*cli.Command in assignment
c:\dev\go\src\github.com\gocomply\xsd2go\cli\cmd\cmd.go:32:43: invalid operation: c.Args()[0] (type cli.Args does not support indexing)
c:\dev\go\src\github.com\gocomply\xsd2go\cli\cmd\cmd.go:32:56: invalid operation: c.Args()[1] (type cli.Args does not support indexing)
c:\dev\go\src\github.com\gocomply\xsd2go\cli\cmd\cmd.go:32:69: invalid operation: c.Args()[2] (type cli.Args does not support indexing)
C:\Users\user>go version
go version go1.14.1 windows/amd64
Static Type IDREF is not yet implemented.
Im currently trying to use the xsd from GAEB. The error can be reproduced with the attached xsd file. Usually gaeb has a lib file with all its type definitions and a seperate xsd with the message definition. Since xsd2go does not support multiple files (#21) I have copied the contents of the lib into the message definition.
lib.xsd.txt -> Type definition library
X83.xsd.txt -> Message definition
combined.xsd.txt -> X83.xsd + Lib.xsd
xsd2go convert combined.xsd gaeb gaeb
The complete package of GAEB definitions can be downloaded here https://www.gaeb.de/wp-content/uploads/2021/06/2021-05_Leistungsverzeichnis.zip
https://www.gaeb.de/de/service/downloads/gaeb-datenaustausch/#1605874164512-4ab864a4-5dfa ( the english version of this page does not list the newest version 3.3)
Processing 'combined.xsd'
Parsing: combined.xsd
panic: Type xsd:IDREF not implemented
goroutine 1 [running]:
github.com/gocomply/xsd2go/pkg/xsd.StaticType(...)
C:/Users/xf/Desktop/tmp/gaeb/xsd2go/pkg/xsd/types.go:276
github.com/gocomply/xsd2go/pkg/xsd.(*Schema).findReferencedType(0xc000258c80, {0xc00041bb30, 0x8})
C:/Users/xf/Desktop/tmp/gaeb/xsd2go/pkg/xsd/schema.go:94 +0x2fd
github.com/gocomply/xsd2go/pkg/xsd.(*Attribute).compile(0xc0003e3050, 0xc000258c80?)
C:/Users/xf/Desktop/tmp/gaeb/xsd2go/pkg/xsd/attribute.go:97 +0xb1
github.com/gocomply/xsd2go/pkg/xsd.(*ComplexType).compile(0xc000402a30, 0xc000258c80, 0xc00010a050?)
C:/Users/xf/Desktop/tmp/gaeb/xsd2go/pkg/xsd/types.go:120 +0x15a
github.com/gocomply/xsd2go/pkg/xsd.(*Schema).compile(0xc000258c80)
C:/Users/xf/Desktop/tmp/gaeb/xsd2go/pkg/xsd/schema.go:61 +0x10a
github.com/gocomply/xsd2go/pkg/xsd.(*Workspace).loadXsd(0xc00008a940, {0xc00010a050, 0xc}, 0x1)
C:/Users/xf/Desktop/tmp/gaeb/xsd2go/pkg/xsd/workspace.go:95 +0xdfa
github.com/gocomply/xsd2go/pkg/xsd.NewWorkspace({0xc0002951d4, 0x9}, {0xc00010a050, 0xc}, {0x7e6638, 0x0, 0x0})
C:/Users/xf/Desktop/tmp/gaeb/xsd2go/pkg/xsd/workspace.go:27 +0xfc
github.com/gocomply/xsd2go/pkg/xsd2go.Convert({0xc00010a050, 0xc}, {0xc00010a060, 0x4}, {0xc00010a070, 0x4}, {0x7e6638, 0x0, 0x0})
C:/Users/xf/Desktop/tmp/gaeb/xsd2go/pkg/xsd2go/generate.go:12 +0x15a
github.com/gocomply/xsd2go/cli/cmd.glob..func2(0xc00008f340?)
C:/Users/xf/Desktop/tmp/gaeb/xsd2go/cli/cmd/cmd.go:44 +0xd1
github.com/urfave/cli.HandleAction({0x505260?, 0x575d50?}, 0x7?)
C:/Users/xf/Desktop/tmp/gaeb/xsd2go/vendor/github.com/urfave/cli/app.go:524 +0xa8
github.com/urfave/cli.Command.Run({{0x559143, 0x7}, {0x0, 0x0}, {0x0, 0x0, 0x0}, {0x56d98c, 0x44}, {0x0, ...}, ...}, ...)
C:/Users/xf/Desktop/tmp/gaeb/xsd2go/vendor/github.com/urfave/cli/command.go:173 +0x652
github.com/urfave/cli.(*App).Run(0xc00027a540, {0xc000112000, 0x5, 0x8})
C:/Users/xf/Desktop/tmp/gaeb/xsd2go/vendor/github.com/urfave/cli/app.go:277 +0x8a7
github.com/gocomply/xsd2go/cli/cmd.Execute()
C:/Users/xf/Desktop/tmp/gaeb/xsd2go/cli/cmd/cmd.go:21 +0x128
main.main()
C:/Users/xf/Desktop/tmp/gaeb/xsd2go/cli/gocomply_xsd2go/main.go:8 +0x19
./gocomply_xsd2go convert schema.xsd github.com/gocomply/goswid swid
Processing 'schema.xsd'
Parsing: schema.xsd
Parsing: xmldsig-core-schema.xsd
panic: Cannot resolve type reference: integer
goroutine 1 [running]:
github.com/gocomply/xsd2go/pkg/xsd.(*Element).compile(0xc0002e4538, 0xc0001f8300, 0x0)
/home/testing/go/src/github.com/gocomply/xsd2go/pkg/xsd/element.go:136 +0x337
github.com/gocomply/xsd2go/pkg/xsd.(*Sequence).compile(0xc0001e5dc0, 0xc0001f8300, 0x0)
/home/testing/go/src/github.com/gocomply/xsd2go/pkg/xsd/sequence.go:21 +0x76
github.com/gocomply/xsd2go/pkg/xsd.(*ComplexType).compile(0xc0001c39e8, 0xc0001f8300, 0x0)
/home/testing/go/src/github.com/gocomply/xsd2go/pkg/xsd/types.go:73 +0x3fc
github.com/gocomply/xsd2go/pkg/xsd.(*Schema).compile(0xc0001f8300)
/home/testing/go/src/github.com/gocomply/xsd2go/pkg/xsd/schema.go:54 +0xc5
github.com/gocomply/xsd2go/pkg/xsd.(*Workspace).loadXsd(0xc0001275e0, 0xc00013f480, 0x17, 0x0, 0x0, 0x0)
/home/testing/go/src/github.com/gocomply/xsd2go/pkg/xsd/workspace.go:51 +0x37d
github.com/gocomply/xsd2go/pkg/xsd.(*Import).load(0xc0001aa870, 0xc0001275e0, 0x89c035, 0x1, 0xc0002a22f8, 0x0)
/home/testing/go/src/github.com/gocomply/xsd2go/pkg/xsd/schema.go:256 +0xbe
github.com/gocomply/xsd2go/pkg/xsd.(*Workspace).loadXsd(0xc0001275e0, 0x7fff0106e988, 0xa, 0x0, 0x0, 0x0)
/home/testing/go/src/github.com/gocomply/xsd2go/pkg/xsd/workspace.go:47 +0x31f
github.com/gocomply/xsd2go/pkg/xsd.NewWorkspace(0xc00013ee20, 0x1f, 0x7fff0106e988, 0xa, 0x2, 0xc00013ee20, 0x1f)
/home/testing/go/src/github.com/gocomply/xsd2go/pkg/xsd/workspace.go:20 +0x84
github.com/gocomply/xsd2go/pkg/xsd2go.Convert(0x7fff0106e988, 0xa, 0x7fff0106e993, 0x1a, 0x7fff0106e9ae, 0x4, 0xc00019db58, 0x945860)
/home/testing/go/src/github.com/gocomply/xsd2go/pkg/xsd2go/generate.go:12 +0x19a
github.com/gocomply/xsd2go/cli/cmd.glob..func2(0xc00015bb80, 0x0, 0xc000119d80)
/home/testing/go/src/github.com/gocomply/xsd2go/cli/cmd/cmd.go:33 +0x82
github.com/urfave/cli.HandleAction(0x814c00, 0x8bf500, 0xc00015bb80, 0xc00015bb80, 0x0)
/home/testing/go/pkg/mod/github.com/urfave/[email protected]/app.go:526 +0x11a
github.com/urfave/cli.Command.Run(0x89f033, 0x7, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8b632f, 0x44, 0x0, ...)
/home/testing/go/pkg/mod/github.com/urfave/[email protected]/command.go:174 +0x57a
github.com/urfave/cli.(*App).Run(0xc0001e8540, 0xc000136000, 0x5, 0x5, 0x0, 0x0)
/home/testing/go/pkg/mod/github.com/urfave/[email protected]/app.go:279 +0x7c7
github.com/gocomply/xsd2go/cli/cmd.Execute(0xffffffff, 0xc00010e058)
/home/testing/go/src/github.com/gocomply/xsd2go/cli/cmd/cmd.go:18 +0x10a
main.main()
/home/testing/go/src/github.com/gocomply/xsd2go/cli/gocomply_xsd2go/main.go:8 +0x22
After convert, I get this kind of struct type
type MyType struct {
XMLName xml.Name `xml:myType`
Name `xml:"name"`
Address `xml:"address"`
// etc.
}
It procudes lint warning struct field tag 'xml:myType' not compatible with reflect.StructTag.Get: bad syntax for struct tag value
since it needs double quotes around myType
.
So instead of xml:myType
it should be xml:"myType"
Fields inside struct has correct xml tag, only the XMLName element has bad syntax tag.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.