updating some changes

This commit is contained in:
brent s. 2021-07-06 13:56:34 -04:00
parent f7b1d8b435
commit 0193f78387
Signed by: bts
GPG Key ID: 8C004C2F93481F6B
4 changed files with 86 additions and 10 deletions

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
attributeFormDefault="unqualified">


</xs:schema>

View File

View File

@ -0,0 +1,51 @@
<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema targetNamespace="https://www.rssboard.org/rss-specification/"
xmlns="https://www.rssboard.org/rss-specification"
xmlns:rss="https://www.rssboard.org/rss-specification"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
attributeFormDefault="unqualified">

<xs:include schemaLocation="../lib/types/net.xsd"/>
<xs:include schemaLocation="../lib/types/rss2.0.xsd"/>

<!--
CURRENT RSS VERSION: 2.0.8
It should be specified as an <rss> attribute as `version="2.0"`, though.
-->
<!-- ROOT -->
<xs:element name="rss">
<xs:complexType>
<xs:all>
<xs:element name="channel" minOccurs="1" maxOccurs="1">
<!--
This is my *opinion*. RSS 2.0 specification does not indicate if the elements should be in order or not.
I enforce it for easy conformance to spec and to remove any ambiguity.
I base the ordering on the sample 2.0 feed (https://www.rssboard.org/files/sample-rss-2.xml).
-->
<xs:sequence>
<xs:element name="title" type="xs:normalizedString" minOccurs="1" maxOccurs="1"/>
<xs:element name="link" type="t_net_http_basic_uri" minOccurs="1" maxOccurs="1"/>
<xs:element name="description" type="xs:string" minOccurs="1" maxOccurs="1"/>
<!--
TODO: This has a pattern definition per:
https://www.rssboard.org/rss-language-codes
https://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes
Maybe an enumeration at some point? But it's... thousands of possible combinations.
And allowances are made for non-official ones, too.
-->
<xs:element name="language" type="xs:normalizedString" minOccurs="0" maxOccurs="1" default="en-us"/>
<xs:element name="copyright" type="xs:normalizedString" minOccurs="0" maxOccurs="1"/>
<xs:element name="managingEditor" type="xs:normalizedString" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
</xs:element>
</xs:all>
<!--
There isn't really a well-defined type string in the RSS spec for what version's valid values ARE, as they specify the version.
"xs:token" should be safe/sane enough.
-->
<xs:attribute name="version" type="xs:token" use="required"/>
</xs:complexType>
</xs:element>

</xs:schema>

View File

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema targetNamespace="https://git.square-r00t.net/VaultPass/"
xmlns="https://git.square-r00t.net/VaultPass/"
xmlns:vaultpass="https://git.square-r00t.net/VaultPass/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
attributeFormDefault="unqualified">
@ -18,16 +17,35 @@
<xs:all>
<xs:element name="uri" type="t_std_uri" minOccurs="0" maxOccurs="1"
default="http://localhost:8200/"/>
<xs:element ref="e_vaultpass_unsealselect" minOccurs="0" maxOccurs="1"/>
<!-- We don't use this anymore because groups don't play very nicely with a lot of libraries. Shame. -->
<!-- <xs:element ref="e_vaultpass_unsealselect" minOccurs="0" maxOccurs="1"/> -->
<xs:element name="unseal">
<xs:complexType>
<xs:choice minOccurs="1" maxOccurs="1">
<xs:element name="unsealGpg" type="t_vaultpass_star_gpg"/>
<xs:element name="unsealPlain" type="t_std_base64"/>
</xs:choice>
</xs:complexType>
</xs:element>
<!-- We don't use this anymore because groups don't play very nicely with a lot of libraries. Shame. -->
<!-- <xs:element ref="e_vaultpass_authselect" minOccurs="1" maxOccurs="1"/> -->
<xs:element name="auth" minOccurs="1" maxOccurs="1">
<xs:complexType>
<xs:choice minOccurs="1" maxOccurs="1">
<xs:element name="authGpg" type="t_vaultpass_star_gpg"/>
<xs:element name="authPlain" type="t_vaultpass_auth_plain"/>
</xs:choice>
</xs:complexType>
</xs:element>
<xs:element name="mounts" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:element name="mount" minOccurs="1" maxOccurs="unbounded" type="t_vaultpass_mount"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:all>
</xs:complexType>
</xs:element>
<xs:element ref="e_vaultpass_authselect" minOccurs="1" maxOccurs="1"/>
<xs:element name="mounts" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:element name="mount" minOccurs="1" maxOccurs="unbounded" type="t_vaultpass_mount"/>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"/>
</xs:complexType>
</xs:element>
</xs:all>