XRI Resolution 2.0 : B. RelaxNG Schema for XRDS and XRD : 俺メモ

 

B. RelaxNG Schema for XRDS and XRD

Following are the locations of the normative RelaxNG compact schema files for XRDS and XRD as defined by this specification:

· xrds.rnc: http://docs.oasis-open.org/xri/xri-resolution/2.0/specs/cd03/xrds.mc

· xrd.rnc: http://docs.oasis-open.org/xri/xri-resolution/2.0/specs/cd03/xrd.mc

IMPORTANT: The xrd.rnc schema does NOT include deprecated attribute values that are recommended for backwards compatibility. See the highlighted Backwards Compatibility notes in sections 9.1.1 and 13.3.2 for more details.

(xrd.rnc ではバックワード互換のため、推奨されない属性は含んでいない。バックワード互換性に関しては9.1.1/13.3.2を参照。)

Listings of these files are provided in this appendix for reference but are non-normative.

xrds.rnc

namespace xrds = "xri://$xrds"

namespace xrd = "xri://$xrd*($v*2.0)"

namespace local = ""

datatypes xs = "http://www.w3.org/2001/XMLSchema-datatypes"

any.element =

  element * {

    ( attribute* { text }*

     | text

     | any.element )*

  }

any.external.element =

  element * – ( xrd:XRD | xrds:XRDS )  {

    ( attribute * { text } *

     | text

     | any.element )*

  }

other.attribute = attribute * – ( local:* ) { text }

start = XRDS

XRDS = element xrds:XRDS {

    other.attribute *,

    ( attribute ref { xs:anyURI } | attribute redirect { xs:anyURI } )?,

    ( any.external.element  | XRDS | external "xrd.rnc" )*

}

xrd.rnc

default namespace = "xri://$xrd*($v*2.0)"

namespace xrd = "xri://$xrd*($v*2.0)"

namespace saml = "urn:oasis:names:tc:SAML:2.0:assertion"

namespace ds = "http://www.w3.org/2000/09/xmldsig#"

namespace local = ""

datatypes xs = "http://www.w3.org/2001/XMLSchema-datatypes"

start = XRD

anyelementbody =

    (attribute * {text}

    | text

    | element * {anyelementbody} )*

non.xrd.element = element * – xrd:* {

    anyelementbody

}

other.attribute = attribute * – ( local:* | xrd:* ) { text }

XRD = element XRD {

    other.attribute *,

    attribute idref { xs:IDREF } ?,

    attribute version { "2.0" } ?,

    XRDType *,

    Query ?,

    Status ?,

    ServerStatus ?,

    Expires ?,

    ProviderID ?,

    ( Redirect+ | Ref+ ) ?,

    LocalID *,

    EquivID *,

    CanonicalID ?,

    CanonicalEquivID ?,

    Service *,

    element saml:Assertion { anyelementbody } ?,

    non.xrd.element *

}

XRDType = element Type {

    other.attribute *,

    xs:anyURI

}

Query = element Query {

    other.attribute *,

    text

}

append.attribute =

    attribute append { "none" | "local" | "authority" | "path" | "query" | "qxri" }

Status = element Status {

    other.attribute *,

    attribute code { xs:integer },

    attribute cid { "absent" | "off" | "verified" | "failed" } ?,

    attribute ceid { "absent" | "off" | "verified" | "failed" } ?,

    text

}

ServerStatus = element ServerStatus {

    other.attribute *,

    attribute code { xs:integer },

    text

}

Expires = element Expires {

    other.attribute *,

    xs:dateTime

}

ProviderID = element ProviderID {

    other.attribute *,

    xs:anyURI

}

Redirect = element Redirect {

    other.attribute *,

    attribute priority { xs:integer }?,

    append.attribute ?,

    xs:anyURI

}

Ref = element Ref {

    other.attribute *,

    attribute priority { xs:integer }?,

    xs:anyURI

}

LocalID = element LocalID {

    other.attribute *,

    attribute priority { xs:integer } ?,

    xs:anyURI

}

EquivID = element EquivID {

    other.attribute *,

    attribute priority { xs:integer } ?,

    xs:anyURI

}

CanonicalID = element CanonicalID {

    other.attribute *,

    xs:anyURI

}

CanonicalEquivID = element CanonicalEquivID {

    other.attribute *,

    xs:anyURI

}

Service = element Service {

    other.attribute *,

    attribute priority { xs:integer }?,

    ProviderID?,

    ServiceType *,

    Path *,

    MediaType *,

    ( URI+ | Redirect+ | Ref+ )?,

    LocalID *,

    element ds:KeyInfo { anyelementbody }?,

    non.xrd.element *

}

URI = element URI {

    other.attribute *,

    attribute priority { xs:integer }?,

    append.attribute ?,

    xs:anyURI

}

selection.attributes = attribute match { "any" | "default" | "non-null" | "null" } ?,

                       attribute select { xs:boolean } ?

ServiceType = element Type {

    other.attribute *,

    selection.attributes,

    xs:anyURI

}

Path = element Path {

    other.attribute *,

    selection.attributes,

    xs:string

}

MediaType = element MediaType {

    other.attribute *,

    selection.attributes,

    xs:string

}

XRI Resolution 2.0

カテゴリー: 未分類 パーマリンク

コメントを残す

以下に詳細を記入するか、アイコンをクリックしてログインしてください。

WordPress.com ロゴ

WordPress.com アカウントを使ってコメントしています。 ログアウト / 変更 )

Twitter 画像

Twitter アカウントを使ってコメントしています。 ログアウト / 変更 )

Facebook の写真

Facebook アカウントを使ってコメントしています。 ログアウト / 変更 )

Google+ フォト

Google+ アカウントを使ってコメントしています。 ログアウト / 変更 )

%s と連携中