Proposed host-meta extensions
This commit is contained in:
parent
91837a2ad5
commit
909f7ec94a
29
contrib/host-meta/rfc6415.but-valid.xml
Normal file
29
contrib/host-meta/rfc6415.but-valid.xml
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
|
<XRD xmlns='http://docs.oasis-open.org/ns/xri/xrd-1.0'
|
||||||
|
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
|
||||||
|
|
||||||
|
<Expires>2010-01-30T09:30:00Z</Expires>
|
||||||
|
<Subject>http://blog.example.com/article/id/314</Subject>
|
||||||
|
|
||||||
|
<Alias>http://blog.example.com/cool_new_thing</Alias>
|
||||||
|
<Alias>http://blog.example.com/steve/article/7</Alias>
|
||||||
|
|
||||||
|
<Property type='http://blgx.example.net/ns/version'>1.2</Property>
|
||||||
|
<Property type='http://blgx.example.net/ns/version'>1.3</Property>
|
||||||
|
<Property type='http://blgx.example.net/ns/ext' xsi:nil='true'/>
|
||||||
|
|
||||||
|
<Link rel='author' type='text/html'
|
||||||
|
href='http://blog.example.com/author/steve'>
|
||||||
|
<Title>About the Author</Title>
|
||||||
|
<Title xml:lang='en-us'>Author Information</Title>
|
||||||
|
<Property type='http://example.com/role'>editor</Property>
|
||||||
|
</Link>
|
||||||
|
|
||||||
|
<Link rel='author' href='http://example.com/author/john'>
|
||||||
|
<Title>The other guy</Title>
|
||||||
|
<Title>The other author</Title>
|
||||||
|
</Link>
|
||||||
|
|
||||||
|
<Link rel='copyright'
|
||||||
|
template='http://example.com/copyright?id={uri}'/>
|
||||||
|
</XRD>
|
37
contrib/host-meta/rfc6415.json
Normal file
37
contrib/host-meta/rfc6415.json
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
{
|
||||||
|
"subject": "http://blog.example.com/article/id/314",
|
||||||
|
"expires": "2010-01-30T09:30:00Z",
|
||||||
|
"aliases": [
|
||||||
|
"http://blog.example.com/cool_new_thing",
|
||||||
|
"http://blog.example.com/steve/article/7"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"http://blgx.example.net/ns/version": "1.3",
|
||||||
|
"http://blgx.example.net/ns/ext": null
|
||||||
|
},
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"rel": "author",
|
||||||
|
"type": "text/html",
|
||||||
|
"href": "http://blog.example.com/author/steve",
|
||||||
|
"titles": {
|
||||||
|
"default": "About the Author",
|
||||||
|
"en-us": "Author Information"
|
||||||
|
},
|
||||||
|
"properties": {
|
||||||
|
"http://example.com/role": "editor"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"rel": "author",
|
||||||
|
"href": "http://example.com/author/john",
|
||||||
|
"titles": {
|
||||||
|
"default": "The other author"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"rel": "copyright",
|
||||||
|
"template": "http://example.com/copyright?id={uri}"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
29
contrib/host-meta/rfc6415.xml
Normal file
29
contrib/host-meta/rfc6415.xml
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
|
<XRD xmlns='http://docs.oasis-open.org/ns/xri/xrd-1.0'
|
||||||
|
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
|
||||||
|
|
||||||
|
<Subject>http://blog.example.com/article/id/314</Subject>
|
||||||
|
<Expires>2010-01-30T09:30:00Z</Expires>
|
||||||
|
|
||||||
|
<Alias>http://blog.example.com/cool_new_thing</Alias>
|
||||||
|
<Alias>http://blog.example.com/steve/article/7</Alias>
|
||||||
|
|
||||||
|
<Property type='http://blgx.example.net/ns/version'>1.2</Property>
|
||||||
|
<Property type='http://blgx.example.net/ns/version'>1.3</Property>
|
||||||
|
<Property type='http://blgx.example.net/ns/ext' xsi:nil='true'/>
|
||||||
|
|
||||||
|
<Link rel='author' type='text/html'
|
||||||
|
href='http://blog.example.com/author/steve'>
|
||||||
|
<Title>About the Author</Title>
|
||||||
|
<Title xml:lang='en-us'>Author Information</Title>
|
||||||
|
<Property type='http://example.com/role'>editor</Property>
|
||||||
|
</Link>
|
||||||
|
|
||||||
|
<Link rel='author' href='http://example.com/author/john'>
|
||||||
|
<Title>The other guy</Title>
|
||||||
|
<Title>The other author</Title>
|
||||||
|
</Link>
|
||||||
|
|
||||||
|
<Link rel='copyright'
|
||||||
|
template='http://example.com/copyright?id={uri}'/>
|
||||||
|
</XRD>
|
45
contrib/host-meta/xep-0156-current.json
Normal file
45
contrib/host-meta/xep-0156-current.json
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
{
|
||||||
|
"subject": "http://blog.example.com/article/id/314",
|
||||||
|
"expires": "2010-01-30T09:30:00Z",
|
||||||
|
"aliases": [
|
||||||
|
"http://blog.example.com/cool_new_thing",
|
||||||
|
"http://blog.example.com/steve/article/7"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"http://blgx.example.net/ns/version": "1.3",
|
||||||
|
"http://blgx.example.net/ns/ext": null
|
||||||
|
},
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"rel": "author",
|
||||||
|
"type": "text/html",
|
||||||
|
"href": "http://blog.example.com/author/steve",
|
||||||
|
"titles": {
|
||||||
|
"default": "About the Author",
|
||||||
|
"en-us": "Author Information"
|
||||||
|
},
|
||||||
|
"properties": {
|
||||||
|
"http://example.com/role": "editor"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"rel": "author",
|
||||||
|
"href": "http://example.com/author/john",
|
||||||
|
"titles": {
|
||||||
|
"default": "The other author"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"rel": "urn:xmpp:alt-connections:xbosh",
|
||||||
|
"href": "https://example.org/http-bind"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"rel": "urn:xmpp:alt-connections:websocket",
|
||||||
|
"href": "wss://example.org/xmpp-websocket"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"rel": "copyright",
|
||||||
|
"template": "http://example.com/copyright?id={uri}"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
33
contrib/host-meta/xep-0156-current.xml
Normal file
33
contrib/host-meta/xep-0156-current.xml
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
|
<XRD xmlns='http://docs.oasis-open.org/ns/xri/xrd-1.0'
|
||||||
|
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
|
||||||
|
|
||||||
|
<Expires>2010-01-30T09:30:00Z</Expires>
|
||||||
|
<Subject>http://blog.example.com/article/id/314</Subject>
|
||||||
|
|
||||||
|
<Alias>http://blog.example.com/cool_new_thing</Alias>
|
||||||
|
<Alias>http://blog.example.com/steve/article/7</Alias>
|
||||||
|
|
||||||
|
<Property type='http://blgx.example.net/ns/version'>1.2</Property>
|
||||||
|
<Property type='http://blgx.example.net/ns/version'>1.3</Property>
|
||||||
|
<Property type='http://blgx.example.net/ns/ext' xsi:nil='true'/>
|
||||||
|
|
||||||
|
<Link rel='author' type='text/html'
|
||||||
|
href='http://blog.example.com/author/steve'>
|
||||||
|
<Title>About the Author</Title>
|
||||||
|
<Title xml:lang='en-us'>Author Information</Title>
|
||||||
|
<Property type='http://example.com/role'>editor</Property>
|
||||||
|
</Link>
|
||||||
|
|
||||||
|
<Link rel='author' href='http://example.com/author/john'>
|
||||||
|
<Title>The other guy</Title>
|
||||||
|
<Title>The other author</Title>
|
||||||
|
</Link>
|
||||||
|
|
||||||
|
<Link rel='urn:xmpp:alt-connections:xbosh' href='https://example.org/http-bind'/>
|
||||||
|
|
||||||
|
<Link rel='urn:xmpp:alt-connections:websocket' href='wss://example.org/xmpp-websocket'/>
|
||||||
|
|
||||||
|
<Link rel='copyright'
|
||||||
|
template='http://example.com/copyright?id={uri}'/>
|
||||||
|
</XRD>
|
1
contrib/host-meta/xep-0156-minimal.json
Normal file
1
contrib/host-meta/xep-0156-minimal.json
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"links":[{"rel":"urn:xmpp:alt-connections:xbosh","href":"https://example.org/http-bind"},{"rel":"urn:xmpp:alt-connections:websocket","href":"wss://example.org/xmpp-websocket"}]}
|
142
contrib/host-meta/xep-0156-proposed.json
Normal file
142
contrib/host-meta/xep-0156-proposed.json
Normal file
@ -0,0 +1,142 @@
|
|||||||
|
{
|
||||||
|
"subject": "http://blog.example.com/article/id/314",
|
||||||
|
"expires": "2010-01-30T09:30:00Z",
|
||||||
|
"aliases": [
|
||||||
|
"http://blog.example.com/cool_new_thing",
|
||||||
|
"http://blog.example.com/steve/article/7"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"http://blgx.example.net/ns/version": "1.3",
|
||||||
|
"http://blgx.example.net/ns/ext": null
|
||||||
|
},
|
||||||
|
"xmpp-public-key-pins-sha-256": [
|
||||||
|
"4/mggdlVx8A3pvHAWW5sD+qJyMtUHgiRuPjVC48N0XQ="
|
||||||
|
],
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"rel": "author",
|
||||||
|
"type": "text/html",
|
||||||
|
"href": "http://blog.example.com/author/steve",
|
||||||
|
"titles": {
|
||||||
|
"default": "About the Author",
|
||||||
|
"en-us": "Author Information"
|
||||||
|
},
|
||||||
|
"properties": {
|
||||||
|
"http://example.com/role": "editor"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"rel": "author",
|
||||||
|
"href": "http://example.com/author/john",
|
||||||
|
"titles": {
|
||||||
|
"default": "The other author"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"rel": "urn:xmpp:alt-connections:xbosh",
|
||||||
|
"href": "https://example.org/http-bind"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"rel": "urn:xmpp:alt-connections:websocket",
|
||||||
|
"href": "wss://example.org/xmpp-websocket"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"rel": "urn:xmpp:alt-connections:websocket",
|
||||||
|
"href": "wss://other.example.org/xmpp-websocket",
|
||||||
|
"ips": [
|
||||||
|
"1.2.3.4",
|
||||||
|
"fd00:feed:dad:beef::1"
|
||||||
|
],
|
||||||
|
"priority": 15,
|
||||||
|
"weight": 50,
|
||||||
|
"sni": "example.org",
|
||||||
|
"alpn": [
|
||||||
|
"h2",
|
||||||
|
"http/1.1",
|
||||||
|
"h3"
|
||||||
|
],
|
||||||
|
"ech": "eG1wcC1jbGllbnQ="
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"rel": "urn:xmpp:alt-connections:tls",
|
||||||
|
"port": 443,
|
||||||
|
"ips": [
|
||||||
|
"1.2.3.4",
|
||||||
|
"fd00:feed:dad:beef::1"
|
||||||
|
],
|
||||||
|
"priority": 10,
|
||||||
|
"weight": 50,
|
||||||
|
"sni": "example.org",
|
||||||
|
"alpn": [
|
||||||
|
"xmpp-client"
|
||||||
|
],
|
||||||
|
"ech": "eG1wcC1jbGllbnQ="
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"rel": "urn:xmpp:alt-connections:quic",
|
||||||
|
"port": 443,
|
||||||
|
"ips": [
|
||||||
|
"1.2.3.4",
|
||||||
|
"fd00:feed:dad:beef::1"
|
||||||
|
],
|
||||||
|
"priority": 5,
|
||||||
|
"weight": 50,
|
||||||
|
"sni": "example.org",
|
||||||
|
"alpn": [
|
||||||
|
"xmpp-client"
|
||||||
|
],
|
||||||
|
"ech": "eG1wcC1jbGllbnQ="
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"rel": "urn:xmpp:alt-connections:s2s-websocket",
|
||||||
|
"href": "wss://other.example.org/s2s-xmpp-websocket",
|
||||||
|
"ips": [
|
||||||
|
"1.2.3.4",
|
||||||
|
"fd00:feed:dad:beef::1"
|
||||||
|
],
|
||||||
|
"priority": 15,
|
||||||
|
"weight": 50,
|
||||||
|
"sni": "example.org",
|
||||||
|
"alpn": [
|
||||||
|
"h2",
|
||||||
|
"http/1.1",
|
||||||
|
"h3"
|
||||||
|
],
|
||||||
|
"ech": "eG1wcC1jbGllbnQ="
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"rel": "urn:xmpp:alt-connections:s2s-tls",
|
||||||
|
"port": 443,
|
||||||
|
"ips": [
|
||||||
|
"1.2.3.4",
|
||||||
|
"fd00:feed:dad:beef::1"
|
||||||
|
],
|
||||||
|
"priority": 10,
|
||||||
|
"weight": 50,
|
||||||
|
"sni": "example.org",
|
||||||
|
"alpn": [
|
||||||
|
"xmpp-server"
|
||||||
|
],
|
||||||
|
"ech": "eG1wcC1jbGllbnQ="
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"rel": "urn:xmpp:alt-connections:s2s-quic",
|
||||||
|
"port": 443,
|
||||||
|
"ips": [
|
||||||
|
"1.2.3.4",
|
||||||
|
"fd00:feed:dad:beef::1"
|
||||||
|
],
|
||||||
|
"priority": 5,
|
||||||
|
"weight": 50,
|
||||||
|
"sni": "example.org",
|
||||||
|
"alpn": [
|
||||||
|
"xmpp-server"
|
||||||
|
],
|
||||||
|
"ech": "eG1wcC1jbGllbnQ="
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"rel": "copyright",
|
||||||
|
"template": "http://example.com/copyright?id={uri}"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
2
contrib/host-meta/xml-validate.sh
Executable file
2
contrib/host-meta/xml-validate.sh
Executable file
@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
exec xmllint --noout --schema xrd-1.0-os.xsd "$1"
|
105
contrib/host-meta/xrd-1.0-os.xsd
Normal file
105
contrib/host-meta/xrd-1.0-os.xsd
Normal file
@ -0,0 +1,105 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<schema
|
||||||
|
targetNamespace="http://docs.oasis-open.org/ns/xri/xrd-1.0"
|
||||||
|
xmlns="http://www.w3.org/2001/XMLSchema"
|
||||||
|
xmlns:xrd="http://docs.oasis-open.org/ns/xri/xrd-1.0"
|
||||||
|
elementFormDefault="unqualified"
|
||||||
|
attributeFormDefault="unqualified"
|
||||||
|
blockDefault="substitution"
|
||||||
|
version="1.0">
|
||||||
|
|
||||||
|
<import namespace="http://www.w3.org/XML/1998/namespace"
|
||||||
|
schemaLocation="http://www.w3.org/2001/xml.xsd"/>
|
||||||
|
|
||||||
|
<annotation>
|
||||||
|
<documentation>
|
||||||
|
Document identifier: xrd-schema-1.0
|
||||||
|
Location: http://docs.oasis-open.org/xri/xrd/v1.0/
|
||||||
|
</documentation>
|
||||||
|
</annotation>
|
||||||
|
|
||||||
|
<complexType name="anyURI">
|
||||||
|
<simpleContent>
|
||||||
|
<extension base="anyURI">
|
||||||
|
<anyAttribute namespace="##other" processContents="lax"/>
|
||||||
|
</extension>
|
||||||
|
</simpleContent>
|
||||||
|
</complexType>
|
||||||
|
|
||||||
|
<complexType name="string">
|
||||||
|
<simpleContent>
|
||||||
|
<extension base="string">
|
||||||
|
<anyAttribute namespace="##other" processContents="lax"/>
|
||||||
|
</extension>
|
||||||
|
</simpleContent>
|
||||||
|
</complexType>
|
||||||
|
|
||||||
|
<element name="XRDS" type="xrd:XRDSType"/>
|
||||||
|
<complexType name="XRDSType">
|
||||||
|
<sequence>
|
||||||
|
<element ref="xrd:XRD" minOccurs="0" maxOccurs="unbounded"/>
|
||||||
|
</sequence>
|
||||||
|
<attribute name="ref" type="anyURI" use="optional"/>
|
||||||
|
</complexType>
|
||||||
|
|
||||||
|
<element name="XRD" type="xrd:XRDType"/>
|
||||||
|
<complexType name="XRDType">
|
||||||
|
<sequence>
|
||||||
|
<element ref="xrd:Expires" minOccurs="0"/>
|
||||||
|
<element ref="xrd:Subject" minOccurs="0"/>
|
||||||
|
<choice minOccurs="0" maxOccurs="unbounded">
|
||||||
|
<element ref="xrd:Alias"/>
|
||||||
|
<element ref="xrd:Property"/>
|
||||||
|
<element ref="xrd:Link"/>
|
||||||
|
<any namespace="##other" processContents="lax"/>
|
||||||
|
</choice>
|
||||||
|
</sequence>
|
||||||
|
<attribute ref="xml:id" use="optional"/>
|
||||||
|
<anyAttribute namespace="##other" processContents="lax"/>
|
||||||
|
</complexType>
|
||||||
|
|
||||||
|
<element name="Expires" type="xrd:ExpiresType"/>
|
||||||
|
<complexType name="ExpiresType">
|
||||||
|
<simpleContent>
|
||||||
|
<extension base="dateTime">
|
||||||
|
<anyAttribute namespace="##other" processContents="lax"/>
|
||||||
|
</extension>
|
||||||
|
</simpleContent>
|
||||||
|
</complexType>
|
||||||
|
|
||||||
|
<element name="Subject" type="xrd:anyURI"/>
|
||||||
|
<element name="Alias" type="xrd:anyURI"/>
|
||||||
|
|
||||||
|
<element name="Property" type="xrd:PropertyType" nillable="true"/>
|
||||||
|
<complexType name="PropertyType">
|
||||||
|
<simpleContent>
|
||||||
|
<extension base="xrd:string">
|
||||||
|
<attribute name="type" type="anyURI" use="required"/>
|
||||||
|
</extension>
|
||||||
|
</simpleContent>
|
||||||
|
</complexType>
|
||||||
|
|
||||||
|
<element name="Link" type="xrd:LinkType"/>
|
||||||
|
<complexType name="LinkType">
|
||||||
|
<choice minOccurs="0" maxOccurs="unbounded">
|
||||||
|
<element ref="xrd:Title"/>
|
||||||
|
<element ref="xrd:Property"/>
|
||||||
|
<any namespace="##other" processContents="lax"/>
|
||||||
|
</choice>
|
||||||
|
<attribute name="rel" type="anyURI" use="optional"/>
|
||||||
|
<attribute name="type" type="string" use="optional"/>
|
||||||
|
<attribute name="href" type="anyURI" use="optional"/>
|
||||||
|
<attribute name="template" type="string" use="optional"/>
|
||||||
|
<anyAttribute namespace="##other" processContents="lax"/>
|
||||||
|
</complexType>
|
||||||
|
|
||||||
|
<element name="Title" type="xrd:TitleType"/>
|
||||||
|
<complexType name="TitleType">
|
||||||
|
<simpleContent>
|
||||||
|
<extension base="xrd:string">
|
||||||
|
<attribute ref="xml:lang" use="optional"/>
|
||||||
|
</extension>
|
||||||
|
</simpleContent>
|
||||||
|
</complexType>
|
||||||
|
|
||||||
|
</schema>
|
Loading…
Reference in New Issue
Block a user