forked from lestrrat-go/libxml2
-
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.
Merge pull request lestrrat-go#69 from lestrrat-go/topic/with-uri
allow ways to specify path/uri when parsing XSD
- Loading branch information
Showing
15 changed files
with
817 additions
and
8 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
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,5 @@ | ||
package option | ||
|
||
const ( | ||
OptKeyWithURI = `with-uri` | ||
) |
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,25 @@ | ||
package option | ||
|
||
type Interface interface { | ||
Name() string | ||
Value() interface{} | ||
} | ||
|
||
type Option struct { | ||
name string | ||
value interface{} | ||
} | ||
|
||
func New(name string, value interface{}) *Option { | ||
return &Option{ | ||
name: name, | ||
value: value, | ||
} | ||
} | ||
|
||
func (o *Option) Name() string { | ||
return o.name | ||
} | ||
func (o *Option) Value() interface{} { | ||
return o.value | ||
} |
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,18 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<libxml2 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns="http://xmlsoft.org/" | ||
xsi:schemaLocation="http://xmlsoft.org/ ./schema/projects/go_libxml2_local.xsd"> | ||
|
||
<sub attrReq="foo" attrOpt="bar"> | ||
<nestedInclude hashType="sha1">4cfcf843c66979eb1df2bd0c52817edb753a52ba</nestedInclude> | ||
</sub> | ||
<sub attrReq="foo2"> | ||
<sub2>this is a test string only.</sub2> | ||
<nestedInclude hashType="sha512">be218408a748759fb98363593b8f544eb054171bced856ca98bd972823dec0b07b205453fc3c46f23c934d0959f1e05b609c011b6ada84a7050ad7c910b24bf1</nestedInclude> | ||
</sub> | ||
<sub attrReq="foo3" attrBoolNoDef="false"> | ||
<sub2>foobar</sub2> | ||
<nestedInclude hashType="md5">f7b34871a562283ee92bbda00485eb45</nestedInclude> | ||
</sub> | ||
|
||
</libxml2> |
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,18 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<libxml2 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns="http://xmlsoft.org/" | ||
xsi:schemaLocation="http://xmlsoft.org/ http://schema.xml.r00t2.io/projects/go_libxml2.xsd"> | ||
|
||
<sub attrReq="foo" attrOpt="bar"> | ||
<nestedInclude hashType="sha1">4cfcf843c66979eb1df2bd0c52817edb753a52ba</nestedInclude> | ||
</sub> | ||
<sub attrReq="foo2"> | ||
<sub2>this is a test string only.</sub2> | ||
<nestedInclude hashType="sha512">be218408a748759fb98363593b8f544eb054171bced856ca98bd972823dec0b07b205453fc3c46f23c934d0959f1e05b609c011b6ada84a7050ad7c910b24bf1</nestedInclude> | ||
</sub> | ||
<sub attrReq="foo3" attrBoolNoDef="false"> | ||
<sub2>foobar</sub2> | ||
<nestedInclude hashType="md5">f7b34871a562283ee92bbda00485eb45</nestedInclude> | ||
</sub> | ||
|
||
</libxml2> |
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,76 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" | ||
elementFormDefault="qualified" | ||
attributeFormDefault="unqualified"> | ||
|
||
<xs:include schemaLocation="./std.xsd"/> | ||
<xs:include schemaLocation="./net.xsd"/> | ||
<xs:include schemaLocation="./unix.xsd"/> | ||
|
||
<xs:simpleType name="t_cksum_algo"> | ||
<!-- Geared towards python. --> | ||
<!-- tuple(sorted(list(hashlib.algorithms_available.union(set(('adler32', 'crc32')))))) --> | ||
<xs:restriction base="xs:string"> | ||
<xs:enumeration value="adler32"/> | ||
<xs:enumeration value="blake2b"/> | ||
<xs:enumeration value="blake2s"/> | ||
<xs:enumeration value="crc32"/> | ||
<xs:enumeration value="md4"/> | ||
<xs:enumeration value="md5"/> | ||
<xs:enumeration value="md5-sha1"/> | ||
<xs:enumeration value="mdc2"/> | ||
<xs:enumeration value="ripemd160"/> | ||
<xs:enumeration value="sha1"/> | ||
<xs:enumeration value="sha224"/> | ||
<xs:enumeration value="sha256"/> | ||
<xs:enumeration value="sha384"/> | ||
<xs:enumeration value="sha3_224"/> | ||
<xs:enumeration value="sha3_256"/> | ||
<xs:enumeration value="sha3_384"/> | ||
<xs:enumeration value="sha3_512"/> | ||
<xs:enumeration value="sha512"/> | ||
<xs:enumeration value="sha512_224"/> | ||
<xs:enumeration value="sha512_256"/> | ||
<xs:enumeration value="shake_128"/> | ||
<xs:enumeration value="shake_256"/> | ||
<xs:enumeration value="sm3"/> | ||
<xs:enumeration value="whirlpool"/> | ||
<xs:whiteSpace value="collapse"/> | ||
</xs:restriction> | ||
</xs:simpleType> | ||
|
||
<xs:complexType name="t_cksum_file"> | ||
<xs:simpleContent> | ||
<xs:extension base="t_net_generic_resource"> | ||
<xs:attribute name="hashType" use="required" type="t_cksum_algo"/> | ||
<xs:attribute name="fileType" use="required" type="t_cksum_file_filetype"/> | ||
<xs:attribute name="filePath" use="optional" type="t_unix_filepath"/> | ||
</xs:extension> | ||
</xs:simpleContent> | ||
</xs:complexType> | ||
|
||
<xs:simpleType name="t_cksum_file_filetype"> | ||
<xs:restriction base="xs:string"> | ||
<xs:enumeration value="gnu"/> | ||
<xs:enumeration value="bsd"/> | ||
<xs:whiteSpace value="collapse"/> | ||
</xs:restriction> | ||
</xs:simpleType> | ||
|
||
<xs:complexType name="t_cksum_hash"> | ||
<xs:simpleContent> | ||
<xs:extension base="t_std_nonempty"> | ||
<xs:attribute name="hashType" use="required" type="t_cksum_algo"/> | ||
</xs:extension> | ||
</xs:simpleContent> | ||
</xs:complexType> | ||
|
||
<xs:complexType name="t_cksum_verify"> | ||
<xs:choice minOccurs="1" maxOccurs="unbounded"> | ||
<xs:element name="checksum" minOccurs="0" maxOccurs="unbounded" type="t_cksum_hash"> | ||
</xs:element> | ||
<xs:element name="checksumFile" minOccurs="0" maxOccurs="unbounded" type="t_cksum_file"/> | ||
</xs:choice> | ||
</xs:complexType> | ||
|
||
</xs:schema> |
Oops, something went wrong.