You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by re...@apache.org on 2005/03/25 14:47:26 UTC
svn commit: r159010 - in cocoon/trunk/src/schema: ./ cob-schema-1.0.xsd
deploy-schema-1.0.xsd test-block.xml test-deploy.xml test-wiring.xml
wiring-schema-1.0.xsd
Author: reinhard
Date: Fri Mar 25 05:47:25 2005
New Revision: 159010
URL: http://svn.apache.org/viewcvs?view=rev&rev=159010
Log:
initial version of schema files desribing 'real blocks' related configuration files
Added:
cocoon/trunk/src/schema/
cocoon/trunk/src/schema/cob-schema-1.0.xsd (with props)
cocoon/trunk/src/schema/deploy-schema-1.0.xsd (with props)
cocoon/trunk/src/schema/test-block.xml (with props)
cocoon/trunk/src/schema/test-deploy.xml (with props)
cocoon/trunk/src/schema/test-wiring.xml (with props)
cocoon/trunk/src/schema/wiring-schema-1.0.xsd (with props)
Added: cocoon/trunk/src/schema/cob-schema-1.0.xsd
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/schema/cob-schema-1.0.xsd?view=auto&rev=159010
==============================================================================
--- cocoon/trunk/src/schema/cob-schema-1.0.xsd (added)
+++ cocoon/trunk/src/schema/cob-schema-1.0.xsd Fri Mar 25 05:47:25 2005
@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 1999-2004 The Apache Software Foundation
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<xs:schema targetNamespace="http://apache.org/cocoon/blocks/cob/1.0"
+ xmlns="http://apache.org/cocoon/blocks/cob/1.0"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="qualified">
+
+ <xs:element name="block">
+ <xs:complexType>
+ <xs:all>
+ <xs:element ref="name" minOccurs="1" maxOccurs="1"/>
+ <xs:element ref="description" minOccurs="1" maxOccurs="1"/>
+ <xs:element ref="state" minOccurs="1" maxOccurs="1"/>
+ <xs:element ref="license" minOccurs="1" maxOccurs="1"/>
+ <xs:element ref="author" minOccurs="1" maxOccurs="1"/>
+ <xs:element ref="sitemap" minOccurs="0" maxOccurs="1"/>
+ <xs:element ref="properties" minOccurs="0" maxOccurs="1"/>
+ <xs:element ref="requirements" minOccurs="0" maxOccurs="1"/>
+ <xs:element ref="implements" minOccurs="0" maxOccurs="1"/>
+ <xs:element ref="extends" minOccurs="0" maxOccurs="1"/>
+ </xs:all>
+ <xs:attribute name="id" type="xs:anyURI" use="required"/>
+ </xs:complexType>
+ </xs:element>
+
+ <!-- general meta data -->
+ <xs:element name="name" type="xs:string"/>
+ <xs:element name="description" type="href"/>
+ <xs:element name="state">
+ <xs:complexType>
+ <xs:attribute name="href" type="xs:anyURI" use="required"/>
+ <xs:attribute name="community" type="community" use="required"/>
+ <xs:attribute name="interfaces" type="stability" use="required"/>
+ <xs:attribute name="implementation" type="stability" use="required"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="license" type="href"/>
+ <xs:element name="author" type="href"/>
+ <xs:element name="sitemap" type="src"/>
+
+ <xs:simpleType name="community">
+ <xs:restriction base="xs:string">
+ <xs:pattern value="committed|supported|deprecated"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="stability">
+ <xs:restriction base="xs:string">
+ <xs:pattern value="stable|unstable"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:complexType name="href">
+ <xs:simpleContent>
+ <xs:extension base="xs:string">
+ <xs:attribute name="href" type="xs:anyURI"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+ <xs:complexType name="src">
+ <xs:simpleContent>
+ <xs:extension base="xs:string">
+ <xs:attribute name="href" type="xs:string" use="required"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <!-- properties -->
+ <xs:element name="properties">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="property" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="property">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="default" minOccurs="0" maxOccurs="1" type="xs:string"/>
+ <xs:element name="description" minOccurs="0" maxOccurs="1" type="xs:string"/>
+ </xs:sequence>
+ <xs:attribute name="name" use="required"/>
+ </xs:complexType>
+ </xs:element>
+
+ <!-- requirements -->
+ <xs:element name="requirements">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="requires" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="requires">
+ <xs:complexType>
+ <xs:attribute name="block" type="xs:anyURI" use="required"/>
+ <xs:attribute name="name" type="xs:string" use="required"/>
+ </xs:complexType>
+ </xs:element>
+
+ <!-- implements -->
+ <xs:element name="implements">
+ <xs:complexType>
+ <xs:attribute name="block" type="xs:anyURI" use="required"/>
+ </xs:complexType>
+ </xs:element>
+
+ <!-- implements -->
+ <xs:element name="extends">
+ <xs:complexType>
+ <xs:attribute name="block" type="xs:anyURI" use="required"/>
+ </xs:complexType>
+ </xs:element>
+
+</xs:schema>
Propchange: cocoon/trunk/src/schema/cob-schema-1.0.xsd
------------------------------------------------------------------------------
eol:style = native
Added: cocoon/trunk/src/schema/deploy-schema-1.0.xsd
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/schema/deploy-schema-1.0.xsd?view=auto&rev=159010
==============================================================================
--- cocoon/trunk/src/schema/deploy-schema-1.0.xsd (added)
+++ cocoon/trunk/src/schema/deploy-schema-1.0.xsd Fri Mar 25 05:47:25 2005
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 1999-2004 The Apache Software Foundation
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<xs:schema targetNamespace="http://cocoon.apache.org/cob-deployment/1.0"
+ xmlns="http://cocoon.apache.org/cob-deployment/1.0"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="qualified">
+
+ <xs:element name="deploy">
+ <xs:complexType>
+ <xs:all>
+ <xs:element ref="locators" minOccurs="1" maxOccurs="1"/>
+ <xs:element ref="install" minOccurs="1" maxOccurs="1"/>
+ </xs:all>
+ </xs:complexType>
+ </xs:element>
+
+ <!-- properties -->
+ <xs:element name="locators">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="locator" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="locator">
+ <xs:complexType>
+ <xs:attribute name="uri" type="xs:anyURI" use="required"/>
+ <xs:attribute name="add-unavailable-blocks" use="optional" type="xs:boolean" default="false"/>
+ </xs:complexType>
+ </xs:element>
+
+ <!-- install (cocoon, blocks) -->
+ <xs:element name="install">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="cocoon" minOccurs="1" maxOccurs="1"/>
+ <xs:element ref="block" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="cocoon">
+ <xs:complexType>
+ <xs:attribute name="target-uri" type="xs:anyURI" use="required"/>
+ <xs:attribute name="version" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:pattern value="2.2"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="block">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="property" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:attribute name="id" type="xs:anyURI" use="required"/>
+ <xs:attribute name="auto-resolve" type="xs:boolean" use="optional" default="false"/>
+ <xs:attribute name="path" type="xs:anyURI" use="optional"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="property">
+ <xs:complexType>
+ <xs:attribute name="name" type="xs:string" use="required"/>
+ <xs:attribute name="value" type="xs:string" use="required"/>
+ </xs:complexType>
+ </xs:element>
+
+
+</xs:schema>
Propchange: cocoon/trunk/src/schema/deploy-schema-1.0.xsd
------------------------------------------------------------------------------
eol:style = native
Added: cocoon/trunk/src/schema/test-block.xml
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/schema/test-block.xml?view=auto&rev=159010
==============================================================================
--- cocoon/trunk/src/schema/test-block.xml (added)
+++ cocoon/trunk/src/schema/test-block.xml Fri Mar 25 05:47:25 2005
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 1999-2004 The Apache Software Foundation
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<block xmlns="http://apache.org/cocoon/blocks/cob/1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://apache.org/cocoon/blocks/cob/1.0 cob-schema-1.0.xsd"
+ id="someidhere">
+ <name>irgendein block</name>
+ <description href="xxxx">yyyy</description>
+ <state href="" community="committed" interfaces="unstable" implementation="unstable"/>
+ <license href=""></license>
+ <author></author>
+ <sitemap href=""></sitemap>
+ <properties>
+ <property name="">
+ <default></default>
+ <description></description>
+ </property>
+ </properties>
+</block>
\ No newline at end of file
Propchange: cocoon/trunk/src/schema/test-block.xml
------------------------------------------------------------------------------
eol:style = native
Added: cocoon/trunk/src/schema/test-deploy.xml
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/schema/test-deploy.xml?view=auto&rev=159010
==============================================================================
--- cocoon/trunk/src/schema/test-deploy.xml (added)
+++ cocoon/trunk/src/schema/test-deploy.xml Fri Mar 25 05:47:25 2005
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 1999-2004 The Apache Software Foundation
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<deploy xmlns="http://cocoon.apache.org/cob-deployment/1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://cocoon.apache.org/cob-deployment/1.0 deploy-schema-1.0.xsd">
+ <locators>
+ <locator uri="C:\myDirectory" add-unavailable-blocks="true"/>
+ <locator uri="F:\anotherDirectory"/>
+ <locator uri="http://cocoon.apache.org/block-repository/"/>
+ </locators>
+ <install>
+ <cocoon version="2.2" target-uri="d:\"/>
+ <block id="http://mycompany.com/webmail/1.3.43" auto-resolve="true">
+ <property name="mailserver" value="xyz"/>
+ </block>
+ <block id="http://mycompany.com/myblock/1.3.43" auto-resolve="false">
+ <property name="driver" value="myDriver.class"/>
+ </block>
+ <block id="http://mycompany.com/myOtherBlock/1.3.43" auto-resolve="false" path="E:\myBlockDevDir"/>
+ </install>
+</deploy>
\ No newline at end of file
Propchange: cocoon/trunk/src/schema/test-deploy.xml
------------------------------------------------------------------------------
eol:style = native
Added: cocoon/trunk/src/schema/test-wiring.xml
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/schema/test-wiring.xml?view=auto&rev=159010
==============================================================================
--- cocoon/trunk/src/schema/test-wiring.xml (added)
+++ cocoon/trunk/src/schema/test-wiring.xml Fri Mar 25 05:47:25 2005
@@ -0,0 +1,51 @@
+<!--
+ Copyright 1999-2004 The Apache Software Foundation
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<wiring xmlns="http://apache.org/cocoon/blocks/wiring/1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://apache.org/cocoon/blocks/wiring/1.0 wiring-schema-1.0.xsd"
+>
+
+ <block id="http://mycompany.com/webmail/1.3.43"
+ location="WEB-INF/blocks/384938958499">
+ <mount path="/mail/"/>
+ <connections>
+ <connection name="external-skin"
+ block="http://yetanothercompany.com/skins/fancy/1.2.2"/>
+ <connection name="internal-skin"
+ block="http://mycompany.com/skins/corporate/34.3.345"/>
+ <connection name="repository"
+ block="http://mycompany.com/repositories/email/exchange/3.2.1"/>
+ </connections>
+ <properties>
+ <property name="user" value="guest"/>
+ <property name="password" value="sj3u493"/>
+ </properties>
+ </block>
+
+ <block id="http://mycompany.com/repositories/email/exchange/3.2.1"
+ location="WEB-INF/blocks/394781274834">
+ <properties>
+ <property name="host" value="mail.blah.org"/>
+ </properties>
+ </block>
+
+ <block id="http://yetanothercompany.com/skins/fancy/1.2.2"
+ location="WEB-INF/blocks/947384127832"/>
+
+ <block id="http://mycompany.com/skins/corporate/34.3.345"
+ location="WEB-INF/blocks/746394782637"/>
+
+</wiring>
\ No newline at end of file
Propchange: cocoon/trunk/src/schema/test-wiring.xml
------------------------------------------------------------------------------
eol:style = native
Added: cocoon/trunk/src/schema/wiring-schema-1.0.xsd
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/schema/wiring-schema-1.0.xsd?view=auto&rev=159010
==============================================================================
--- cocoon/trunk/src/schema/wiring-schema-1.0.xsd (added)
+++ cocoon/trunk/src/schema/wiring-schema-1.0.xsd Fri Mar 25 05:47:25 2005
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 1999-2004 The Apache Software Foundation
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<xs:schema targetNamespace="http://apache.org/cocoon/blocks/wiring/1.0"
+ xmlns="http://apache.org/cocoon/blocks/wiring/1.0"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="qualified">
+
+ <xs:element name="wiring">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="block" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="block">
+ <xs:complexType>
+ <xs:all>
+ <xs:element ref="mount" minOccurs="0" maxOccurs="1"/>
+ <xs:element ref="connections" minOccurs="0" maxOccurs="1"/>
+ <xs:element ref="properties" minOccurs="0" maxOccurs="1"/>
+ </xs:all>
+ <xs:attribute name="id" type="xs:anyURI" use="required"/>
+ <xs:attribute name="location" type="xs:anyURI" use="required"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="mount">
+ <xs:complexType>
+ <xs:attribute name="path" type="xs:string" use="required"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="connections">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="connection" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="connection">
+ <xs:complexType>
+ <xs:attribute name="name" type="xs:string" use="required"/>
+ <xs:attribute name="block" type="xs:anyURI" use="required"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="properties">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="property" minOccurs="1" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="property">
+ <xs:complexType>
+ <xs:attribute name="name" type="xs:string" use="required"/>
+ <xs:attribute name="value" type="xs:string" use="required"/>
+ </xs:complexType>
+ </xs:element>
+
+
+</xs:schema>
Propchange: cocoon/trunk/src/schema/wiring-schema-1.0.xsd
------------------------------------------------------------------------------
eol:style = native