| <?xml version="1.0"?> |
| <!-- |
| |
| This is the Niku XBL schema. This version complies with the |
| current W3C XML Schema recommendation. To use this schema, |
| start your XBL document with: |
| |
| <xbl:template xmlns:xbl="http://schemas.niku.com/xbl" |
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| xsi:schemaLocation="http://schemas.niku.com/xbl ../../union/xsd/xbl-2003-02.xsd"> |
| --> |
| <schema targetNamespace="http://schemas.niku.com/xbl" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xpath="http://www.w3.org/TR/2001/WD-xptr-20010108/" xmlns:xbl="http://schemas.niku.com/xbl" xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" blockDefault="#all" xsi:schemaLocation="http://www.w3.org/2001/XMLSchema http://www.w3.org/2001/XMLSchema.xsd"> |
| <import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/> |
| <import namespace="http://www.w3.org/2001/XMLSchema"/> |
| <!-- There are three ways that you can construct a |
| schema for XSLT stylesheets that create instances of a |
| particular result structure |
| |
| (a) Declare all your result elements as a member of |
| xbl:result-element substitution group |
| |
| (b) Redefine model group xbl:result-element to accomodate |
| the desired structure |
| |
| (c) Do nothing. This schema is designed to allow any element node |
| or nodes if they have any namespace other than the XSLT |
| namespace or not namespace qualified |
| |
| I recommend (a) or (b) |
| |
| In addition, I added a an attributeGroup util, 'result-element' |
| for your convenience |
| --> |
| <element name="result-element" type="anyType" abstract="true"/> |
| <attributeGroup name="result-element"> |
| <anyAttribute namespace="##other" processContents="skip"/> |
| </attributeGroup> |
| <group name="result-element"> |
| <choice> |
| <element ref="xbl:result-element"/> |
| <any namespace="##other" processContents="skip"/> |
| </choice> |
| </group> |
| <!-- *** Style Sheet Elements *** --> |
| <!-- *** *** --> |
| <element name="template" type="xbl:wrapper"/> |
| <complexType name="wrapper"> |
| <complexContent> |
| <extension base="xbl:anyType"> |
| <sequence> |
| <choice minOccurs="0" maxOccurs="unbounded"> |
| <element ref="xbl:top-level-element"/> |
| <element ref="xbl:top-level-element-and-char-instruction"/> |
| <element ref="xbl:variable"/> |
| <element ref="xbl:instruction"/> |
| <group ref="xbl:result-element"/> |
| <any namespace="##other" processContents="skip"/> |
| <!-- weaker than XSLT 1.0 --> |
| </choice> |
| </sequence> |
| <attribute ref="xml:space"/> |
| </extension> |
| </complexContent> |
| </complexType> |
| <!-- *** top level elements *** --> |
| <!-- *** *** --> |
| <element name="top-level-element" type="xbl:anyType" abstract="true"/> |
| <element name="top-level-element-and-char-instruction" type="xbl:anyType" abstract="true"/> |
| <!-- *** top level elements and char instructions *** --> |
| <!-- *** *** --> |
| <element name="variable" type="xbl:variable" substitutionGroup="xbl:char-instruction"/> |
| <element name="instruction" type="xbl:anyType" abstract="true"/> |
| <element name="char-instruction" type="xbl:anyType" abstract="true" substitutionGroup="xbl:instruction"/> |
| <element name="attribute" substitutionGroup="xbl:instruction"> |
| <complexType> |
| <attribute name="name" type="string" use="required"/> |
| <attribute name="value" type="string" use="optional"/> |
| </complexType> |
| </element> |
| <element name="include" substitutionGroup="xbl:instruction"> |
| <complexType> |
| <complexContent> |
| <extension base="xbl:anyType"> |
| <attribute name="href" type="anyURI" use="required"/> |
| <attribute name="componentId" type="xbl:expression" use="optional"/> |
| </extension> |
| </complexContent> |
| </complexType> |
| </element> |
| <element name="call" substitutionGroup="xbl:char-instruction"> |
| <complexType> |
| <complexContent> |
| <extension base="xbl:anyType"> |
| <sequence minOccurs="0" maxOccurs="unbounded"> |
| <element ref="xbl:call-param"/> |
| </sequence> |
| <attribute name="href" type="anyURI" use="required"/> |
| <attribute name="componentId" type="xbl:expression" use="optional"/> |
| </extension> |
| </complexContent> |
| </complexType> |
| </element> |
| <element name="parameter"> |
| <complexType mixed="true"> |
| <complexContent mixed="true"> |
| <extension base="xbl:anyType"> |
| <group ref="xbl:template" minOccurs="0" maxOccurs="unbounded"/> |
| <attribute name="name" type="xbl:QName" use="required"/> |
| <attribute name="type" type="string"/> |
| <attribute name="value" type="string"/> |
| <attribute name="position" type="string"/> |
| <attribute name="dynamicSql" type="string"/> |
| </extension> |
| </complexContent> |
| </complexType> |
| </element> |
| <element name="execute" substitutionGroup="xbl:char-instruction"> |
| <complexType> |
| <complexContent> |
| <extension base="xbl:anyType"> |
| <sequence minOccurs="0" maxOccurs="unbounded"> |
| <element ref="xbl:parameter"/> |
| </sequence> |
| <attribute name="name" type="xbl:QName" use="optional"/> |
| <attribute name="source" type="string" use="required"/> |
| <attribute name="value" type="string" use="required"/> |
| </extension> |
| </complexContent> |
| </complexType> |
| </element> |
| <element name="query" substitutionGroup="xbl:char-instruction"> |
| <complexType> |
| <complexContent> |
| <extension base="xbl:anyType"> |
| <sequence minOccurs="0" maxOccurs="unbounded"> |
| <element ref="xbl:parameter"/> |
| </sequence> |
| <attribute name="name" type="xbl:QName" use="required"/> |
| </extension> |
| </complexContent> |
| </complexType> |
| </element> |
| <element name="custom" substitutionGroup="xbl:char-instruction"> |
| <complexType> |
| <attribute name="name" type="string" use="required"/> |
| <attribute name="class" type="string" use="required"/> |
| </complexType> |
| </element> |
| <element name="function" substitutionGroup="xbl:char-instruction"> |
| <complexType> |
| <attribute name="name" type="string" use="required"/> |
| <attribute name="class" type="string" use="required"/> |
| </complexType> |
| </element> |
| <element name="invoke" substitutionGroup="xbl:char-instruction"> |
| <complexType mixed="true"> |
| <complexContent mixed="true"> |
| <extension base="xbl:anyType"> |
| <sequence> |
| <choice minOccurs="0" maxOccurs="unbounded"> |
| <element ref="xbl:top-level-element-and-char-instruction"/> |
| <element ref="xbl:instruction"/> |
| <group ref="xbl:result-element"/> |
| </choice> |
| </sequence> |
| <attribute name="name" type="string" use="required"/> |
| <attribute name="class" type="string" use="optional"/> |
| </extension> |
| </complexContent> |
| </complexType> |
| </element> |
| <element name="attributes" substitutionGroup="xbl:char-instruction"> |
| <complexType> |
| <attribute name="select" type="xbl:expression" use="optional"/> |
| </complexType> |
| </element> |
| <element name="pagination" substitutionGroup="xbl:char-instruction"> |
| <complexType> |
| <attribute name="objectSet" type="xbl:expression" use="optional"/> |
| <attribute name="page" type="xbl:expression" use="optional"/> |
| <attribute name="count" type="xbl:expression" use="optional"/> |
| <attribute name="pageSize" type="xbl:expression" use="optional"/> |
| <attribute name="pageSize" type="xbl:expression" use="optional"/> |
| </complexType> |
| </element> |
| <element name="choose" substitutionGroup="xbl:char-instruction"> |
| <complexType> |
| <complexContent> |
| <extension base="xbl:anyType"> |
| <sequence> |
| <element ref="xbl:when" maxOccurs="unbounded"/> |
| <element ref="xbl:otherwise" minOccurs="0"/> |
| </sequence> |
| <attribute ref="xml:space"/> |
| </extension> |
| </complexContent> |
| </complexType> |
| </element> |
| <element name="match" substitutionGroup="xbl:char-instruction"> |
| <complexType mixed="true"> |
| <complexContent mixed="true"> |
| <extension base="xbl:anyType"> |
| <sequence> |
| <choice minOccurs="0" maxOccurs="unbounded"> |
| <element ref="xbl:top-level-element-and-char-instruction"/> |
| <element ref="xbl:instruction"/> |
| <group ref="xbl:result-element"/> |
| </choice> |
| <element ref="xbl:else" minOccurs="0"/> |
| </sequence> |
| <attribute name="select" type="xbl:expression" use="required"/> |
| <attribute name="filter" type="string" use="optional"/> |
| <attribute ref="xml:space"/> |
| </extension> |
| </complexContent> |
| </complexType> |
| </element> |
| <element name="for-each" substitutionGroup="xbl:char-instruction"> |
| <complexType mixed="true"> |
| <complexContent mixed="true"> |
| <extension base="xbl:anyType"> |
| <sequence> |
| <element ref="xbl:sort" minOccurs="0" maxOccurs="unbounded"/> |
| <choice minOccurs="0" maxOccurs="unbounded"> |
| <element ref="xbl:top-level-element-and-char-instruction"/> |
| <element ref="xbl:instruction"/> |
| <group ref="xbl:result-element"/> |
| </choice> |
| </sequence> |
| <attribute name="select" type="xbl:expression" use="required"/> |
| <attribute name="filter" type="string" use="optional"/> |
| <attribute ref="xml:space"/> |
| </extension> |
| </complexContent> |
| </complexType> |
| </element> |
| <element name="if" substitutionGroup="xbl:char-instruction"> |
| <complexType mixed="true"> |
| <complexContent mixed="true"> |
| <extension base="xbl:anyType"> |
| <sequence> |
| <choice minOccurs="0" maxOccurs="unbounded"> |
| <element ref="xbl:top-level-element-and-char-instruction"/> |
| <element ref="xbl:instruction"/> |
| <group ref="xbl:result-element"/> |
| </choice> |
| <element ref="xbl:else" minOccurs="0"/> |
| </sequence> |
| <attribute name="test" type="xbl:expression" use="required"/> |
| <attribute ref="xml:space"/> |
| </extension> |
| </complexContent> |
| </complexType> |
| </element> |
| <element name="try" substitutionGroup="xbl:char-instruction"> |
| <complexType mixed="true"> |
| <complexContent mixed="true"> |
| <extension base="xbl:anyType"> |
| <sequence> |
| <choice minOccurs="0" maxOccurs="unbounded"> |
| <element ref="xbl:top-level-element-and-char-instruction"/> |
| <element ref="xbl:instruction"/> |
| <group ref="xbl:result-element"/> |
| </choice> |
| <element ref="xbl:catch" maxOccurs="unbounded"/> |
| </sequence> |
| <attribute ref="xml:space"/> |
| </extension> |
| </complexContent> |
| </complexType> |
| </element> |
| <element name="throw" substitutionGroup="xbl:char-instruction"> |
| <complexType> |
| <sequence> |
| <element ref="xbl:message"/> |
| </sequence> |
| </complexType> |
| </element> |
| <element name="sort" substitutionGroup="xbl:instruction"> |
| <complexType> |
| <attribute name="select" type="xbl:expression" use="optional"/> |
| <attribute name="field" type="xbl:expression" use="optional"/> |
| <attribute name="ascending" type="xbl:boolean" use="optional" default="false"/> |
| <attribute name="descending" type="xbl:boolean" use="optional" default="true"/> |
| </complexType> |
| </element> |
| <element name="message" substitutionGroup="xbl:instruction"> |
| <complexType> |
| <attribute name="id" type="string" use="required"/> |
| <attribute name="type" type="string" use="optional"/> |
| <attribute name="location" type="string" use="optional"/> |
| </complexType> |
| </element> |
| <element name="log" substitutionGroup="xbl:char-instruction"> |
| <complexType mixed="true"> |
| <complexContent mixed="true"> |
| <extension base="xbl:anyType"> |
| <attribute name="value" type="string" use="optional"/> |
| <attribute name="level" type="string" use="optional"/> |
| <attribute name="exception" type="string" use="optional"/> |
| </extension> |
| </complexContent> |
| </complexType> |
| </element> |
| <!-- *** orphans *** --> |
| <!-- *** *** --> |
| <element name="otherwise"> |
| <complexType mixed="true"> |
| <complexContent mixed="true"> |
| <extension base="xbl:anyType"> |
| <group ref="xbl:template" minOccurs="0" maxOccurs="unbounded"/> |
| <attribute ref="xml:space"/> |
| </extension> |
| </complexContent> |
| </complexType> |
| </element> |
| <element name="else"> |
| <complexType mixed="true"> |
| <complexContent mixed="true"> |
| <extension base="xbl:anyType"> |
| <group ref="xbl:template" minOccurs="0" maxOccurs="unbounded"/> |
| <attribute ref="xml:space"/> |
| </extension> |
| </complexContent> |
| </complexType> |
| </element> |
| <element name="catch"> |
| <complexType mixed="true"> |
| <complexContent mixed="true"> |
| <extension base="xbl:anyType"> |
| <group ref="xbl:template" minOccurs="0" maxOccurs="unbounded"/> |
| <attribute ref="xml:space"/> |
| </extension> |
| </complexContent> |
| </complexType> |
| </element> |
| <element name="when"> |
| <complexType mixed="true"> |
| <complexContent mixed="true"> |
| <extension base="xbl:anyType"> |
| <group ref="xbl:template" minOccurs="0" maxOccurs="unbounded"/> |
| <attribute name="test" type="xbl:expression" use="required"/> |
| <attribute ref="xml:space"/> |
| </extension> |
| </complexContent> |
| </complexType> |
| </element> |
| <element name="call-param"> |
| <complexType mixed="true"> |
| <complexContent mixed="true"> |
| <extension base="xbl:variable"> |
| <attribute name="type" type="string"/> |
| </extension> |
| </complexContent> |
| </complexType> |
| </element> |
| <!-- *** utils - internal types and groups *** --> |
| <!-- *** not for public use *** --> |
| <simpleType name="boolean"> |
| <restriction base="string"> |
| <enumeration value="true"/> |
| <enumeration value="false"/> |
| </restriction> |
| </simpleType> |
| <simpleType name="QNames"> |
| <list itemType="xbl:QName"/> |
| </simpleType> |
| <group name="template"> |
| <choice> |
| <element ref="xbl:top-level-element-and-char-instruction"/> |
| <element ref="xbl:instruction"/> |
| <group ref="xbl:result-element"/> |
| </choice> |
| </group> |
| <simpleType name="QName"> |
| <union memberTypes="NCName QName"/> |
| </simpleType> |
| <simpleType name="element-names"> |
| <list> |
| <simpleType> |
| <union memberTypes="QName"> |
| <simpleType> |
| <restriction base="string"> |
| <pattern value="\*"/> |
| <pattern value="\i\c*:\*"/> |
| </restriction> |
| </simpleType> |
| </union> |
| </simpleType> |
| </list> |
| </simpleType> |
| <complexType name="variable" mixed="true"> |
| <complexContent mixed="true"> |
| <extension base="xbl:anyType"> |
| <group ref="xbl:template" minOccurs="0" maxOccurs="unbounded"/> |
| <attribute name="name" type="xbl:QName" use="required"/> |
| <attribute name="value" type="xbl:expression"/> |
| </extension> |
| </complexContent> |
| </complexType> |
| <simpleType name="expr-avt"> |
| <restriction base="string"/> |
| </simpleType> |
| <simpleType name="expression"> |
| <restriction base="string"/> |
| </simpleType> |
| <complexType name="anyType"> |
| <anyAttribute namespace="##other" processContents="skip"/> |
| </complexType> |
| </schema> |