OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

xri message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: RE: [xri] RelaxNG schemas for XRI resolution


BTW, I’m recommending the RelaxNG schema be normative now…

 


From: Gabe Wachob [mailto:gabe.wachob@amsoft.net]
Sent: Monday, October 22, 2007 6:18 PM
To: 'OASIS XRI TC'
Subject: [xri] RelaxNG schemas for XRI resolution

 

I went ahead and threw together two RelaxNG schemas (one for XRDS, one for XRD). Please check carefully – this is a very rough cut and I had to guess at element ordering in many places.

 

I note that in the document, there are a lot of places where attributes are referred to by qualified name – I missed in this in my last review, but I believe the XML schema and our decision was to make them *unqualified* - so in section 4.1, you wouldn’t use @xrds:ref, you’d simply use @ref

 

Anyway here’s the two schemas cut n pasted in:

 

xrds.rnc

 

namespace xrds = "xrd://$xrds"

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

 

anyelement =

  element * {

    (attribute * { text }

     | text

     | anyelement)*

  }

 

start = element xrds:XRDS {

    attribute ref { xs:anyURI },

    anyelement *

}

 

xrd.rnc

 

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

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

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

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

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

datatypes rd = "http://relaxng.org/ns/compatibility/datatypes/1.0"

 

start=XRD

 

anyelementbody =

    (attribute * {text}

    | text

    | element * {anyelementbody} )*

   

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

    anyelementbody

}

   

non.xrd.attribute = attribute * - xrd:* {text}

 

# XRD Element

# XXX Need to check order of the following

XRD=element XRD {

    attribute xml:id {rd:ID} ?,

    attribute idref {rd:IDREF} ?,

    attribute version { "2.0" } ?,

    Query ?,

    Status ?,

    ServerStatus ?,

    Expires ?,

    ProviderID ?,

    (Redirect | Ref) ?,

    LocalID *,

    EquivID *,

    CanonicalID ?,

    CanonicalEquivID ?,

    Service *,

    element saml:Assertion {anyelementbody} ?,

    non.xrd.element *

}

 

Query=element Query {

    non.xrd.attribute *,

    text

}

 

statuspattern = attribute code {xs:integer},

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

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

    text

   

Status=element Status {

    statuspattern

}

 

ServerStatus = element ServerStatus {

    statuspattern

}

 

Expires = element Expires {

    xs:dateTime

}

 

Redirect = element Redirect {

    attribute priority {xs:integer}?,

    xs:anyURI

}

 

Ref = element Ref{

    attribute priority {xs:integer}?,

    xs:anyURI

}

 

 

ProviderID = element ProviderID {

    xs:anyURI

}

 

# not specifying requirements for saml:Assertion - maybe we should?

 

LocalID = element LocalID {

    attribute priority {xs:integer},

    xs:anyURI

}

 

EquivID = element EquivID {

    attribute priority {xs:integer},

    xs:anyURI

}

 

CanonicalID = element CanonicalID {

    xs:anyURI

}

 

CanonicalEquivID = element CanonicalEquivID {

    xs:anyURI

}

 

Service = element Service {

    attribute priority {xs:integer}?,

    ProviderID?,

    LocalID *,

    Type *,

    Path *,

    MediaType *,

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

    element ds:KeyInfo {anyelementbody}?,

    non.xrd.element *

}

 

URI = element URI {

    attribute priority {xs:integer}?,

    xs:anyURI

}

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

                        attribute select { xs:boolean}

Type = element Type {

    selection.attributes,

    xs:anyURI

}

 

Path = element Path {

    selection.attributes,

    xs:string

}

 

MediaType = element MediaType {

    selection.attributes,

    xs:string

}



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]