You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2008/02/22 01:26:24 UTC
svn commit: r630054 - in /lenya/trunk/src/modules:
collection/config/cocoon-xconf/resourcetype-collection.xconf
collection/resources/schemas/ collection/resources/schemas/collection.rng
news/config/cocoon-xconf/resourcetype-news.xconf
Author: andreas
Date: Thu Feb 21 16:26:17 2008
New Revision: 630054
URL: http://svn.apache.org/viewvc?rev=630054&view=rev
Log:
Adding schema for collection and news resource type.
Added:
lenya/trunk/src/modules/collection/resources/schemas/
lenya/trunk/src/modules/collection/resources/schemas/collection.rng
Modified:
lenya/trunk/src/modules/collection/config/cocoon-xconf/resourcetype-collection.xconf
lenya/trunk/src/modules/news/config/cocoon-xconf/resourcetype-news.xconf
Modified: lenya/trunk/src/modules/collection/config/cocoon-xconf/resourcetype-collection.xconf
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/collection/config/cocoon-xconf/resourcetype-collection.xconf?rev=630054&r1=630053&r2=630054&view=diff
==============================================================================
--- lenya/trunk/src/modules/collection/config/cocoon-xconf/resourcetype-collection.xconf (original)
+++ lenya/trunk/src/modules/collection/config/cocoon-xconf/resourcetype-collection.xconf Thu Feb 21 16:26:17 2008
@@ -23,12 +23,8 @@
<component-instance name="collection"
logger="lenya.resourcetypes.collection"
class="org.apache.lenya.cms.publication.ResourceTypeImpl">
- <!-- FIXME: shouldn't this resource type provide validation?
- <schema
- namespace="http://relaxng.org/ns/structure/0.9"
- uri=""
- />
- -->
+ <schema namespace="http://relaxng.org/ns/structure/0.9"
+ uri="fallback://lenya/modules/collection/resources/schemas/collection.rng"/>
<sample name="Manual" mime-type="application/xml" uri="fallback://lenya/modules/collection/samples/collection.xml"/>
<sample name="Children" mime-type="application/xml" uri="fallback://lenya/modules/collection/samples/children.xml"/>
<format name="collection" uri="cocoon://modules/collection/collection.xml"/>
Added: lenya/trunk/src/modules/collection/resources/schemas/collection.rng
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/collection/resources/schemas/collection.rng?rev=630054&view=auto
==============================================================================
--- lenya/trunk/src/modules/collection/resources/schemas/collection.rng (added)
+++ lenya/trunk/src/modules/collection/resources/schemas/collection.rng Thu Feb 21 16:26:17 2008
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+-->
+<grammar ns="http://apache.org/cocoon/lenya/collection/1.0"
+ xmlns="http://relaxng.org/ns/structure/1.0"
+ datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
+
+ <start>
+ <element name="collection">
+ <optional>
+ <attribute name="type">
+ <choice>
+ <value>manual</value>
+ <value>children</value>
+ <value>link</value>
+ </choice>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="includeItems">
+ <data type="positiveInteger"/>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="href">
+ <text/>
+ </attribute>
+ </optional>
+ <zeroOrMore>
+ <ref name="document"/>
+ </zeroOrMore>
+ </element>
+ </start>
+
+ <define name="document">
+ <element name="document">
+ <attribute name="uuid">
+ <ref name="uuid"/>
+ </attribute>
+ </element>
+ </define>
+
+ <define name="uuid">
+ <data type="string">
+ <param name="pattern">/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}/</param>
+ </data>
+ </define>
+
+</grammar>
Modified: lenya/trunk/src/modules/news/config/cocoon-xconf/resourcetype-news.xconf
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/news/config/cocoon-xconf/resourcetype-news.xconf?rev=630054&r1=630053&r2=630054&view=diff
==============================================================================
--- lenya/trunk/src/modules/news/config/cocoon-xconf/resourcetype-news.xconf (original)
+++ lenya/trunk/src/modules/news/config/cocoon-xconf/resourcetype-news.xconf Thu Feb 21 16:26:17 2008
@@ -27,6 +27,9 @@
<!-- Default time in seconds until the resource-type has expired -->
<expires seconds="3600" />
+ <schema namespace="http://relaxng.org/ns/structure/0.9"
+ uri="fallback://lenya/modules/collection/resources/schemas/collection.rng"/>
+
<sample
mime-type="application/xml"
uri="fallback://lenya/modules/news/samples/news.xml"
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org