forked from droyo/go-xml
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Many complex types wrap simple types and add attributes to them. Code generated for *any* complex types that are derived from such types need to provide a ",chardata" field for the mixed content. Previously the xsdgen package only generated such a field when a type was being extended, but a restriction is just as valid.
- Loading branch information
Showing
3 changed files
with
69 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://example.org" targetNamespace="http://example.org"> | ||
|
||
<xs:complexType name="Number"> | ||
<xs:simpleContent> | ||
<xs:extension base="xs:double"> | ||
<xs:attribute name="precision" type="xs:int"/> | ||
</xs:extension> | ||
</xs:simpleContent> | ||
</xs:complexType> | ||
|
||
<xs:complexType name="PositiveNumber"> | ||
<xs:simpleContent> | ||
<xs:restriction base="ns:Number"> | ||
<xs:minInclusive value="1"/> | ||
</xs:restriction> | ||
</xs:simpleContent> | ||
</xs:complexType> | ||
|
||
</xs:schema> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters