svn commit: r565263 - in /lenya/trunk/src: pubs/default/config/workflow/workflow.xml resources/build/workflow.rng targets/webapp-build.xml webapp/lenya/resources/entities/ webapp/readme.xml

[email protected]
Newsgroups gmane.comp.cms.lenya.cvs
Message-ID <[email protected]>
Author: nettings
Date: Mon Aug 13 01:08:39 2007
New Revision: 565263

URL: http://svn.apache.org/viewvc?view=rev&rev=565263
Log:
removed unused workflow validation xsd.
ported xsd to rng, it is now applied during build.
this change requires the xsi:schemaLocation attribute to be removed from
custom workflow declarations.
fixes bug http://issues.apache.org/bugzilla/show_bug.cgi?id=42351


Added:
    lenya/trunk/src/resources/build/workflow.rng
Removed:
    lenya/trunk/src/webapp/lenya/resources/entities/
Modified:
    lenya/trunk/src/pubs/default/config/workflow/workflow.xml
    lenya/trunk/src/targets/webapp-build.xml
    lenya/trunk/src/webapp/readme.xml

Modified: lenya/trunk/src/pubs/default/config/workflow/workflow.xml
URL: http://svn.apache.org/viewvc/lenya/trunk/src/pubs/default/config/workflow/workflow.xml?view=diff&rev=565263&r1=565262&r2=565263
==============================================================================
--- lenya/trunk/src/pubs/default/config/workflow/workflow.xml (original)
+++ lenya/trunk/src/pubs/default/config/workflow/workflow.xml Mon Aug 13 01:08:39 2007
@@ -18,9 +18,7 @@
 
 <!-- $Id$ -->
 
-<workflow xmlns="http://apache.org/cocoon/lenya/workflow/1.0"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://apache.org/cocoon/lenya/workflow/1.0 ../../../../resources/entities/workflow.xsd">
+<workflow xmlns="http://apache.org/cocoon/lenya/workflow/1.0">
 
   <state id="authoring" initial="true"/>
   <state id="review"/>

Added: lenya/trunk/src/resources/build/workflow.rng
URL: http://svn.apache.org/viewvc/lenya/trunk/src/resources/build/workflow.rng?view=auto&rev=565263
==============================================================================
--- lenya/trunk/src/resources/build/workflow.rng (added)
+++ lenya/trunk/src/resources/build/workflow.rng Mon Aug 13 01:08:39 2007
@@ -0,0 +1,91 @@
+<?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.
+-->
+
+<!-- $Id: workflow.xsd 473861 2006-11-12 03:51:14Z gregor $ -->
+
+<grammar 
+  xmlns="http://relaxng.org/ns/structure/1.0"
+  datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
+>
+
+  <define name="simpleNameToken">
+    <data type="string">
+      <param name="pattern">[\-_a-zA-Z]+</param>
+    </data>
+  </define>
+
+  <define name="javaClassName">
+    <data type="string">
+      <param name="pattern">([\-_a-zA-Z0-9]+\.)+[\-_a-zA-Z0-9]+</param>
+    </data>
+  </define>
+
+  <define name="booleanString">
+    <choice>
+      <value>true</value>
+      <value>false</value>
+    </choice>
+  </define>
+
+<start>
+
+<element 
+   name="workflow"    ns="http://apache.org/cocoon/lenya/workflow/1.0"
+>
+  <zeroOrMore>
+    <element name="state">
+      <attribute name="id"><ref name="simpleNameToken"/></attribute>
+      <optional>
+        <attribute name="initial"><value>true</value></attribute>
+      </optional>
+    </element>
+  </zeroOrMore>
+  <!-- can this be made more flexible? zeroOrMore variables of arbitrary type? -->
+  <element name="variable">
+    <attribute name="name"><ref name="simpleNameToken"/></attribute>
+    <attribute name="value">
+      <ref name="booleanString"/>
+    </attribute>
+  </element>
+  <oneOrMore>
+    <element name="transition">
+      <attribute name="source"><ref name="simpleNameToken"/></attribute>
+      <attribute name="destination"><ref name="simpleNameToken"/></attribute>
+      <element name="event">
+        <attribute name="id"><ref name="simpleNameToken"/></attribute>
+      </element>
+      <oneOrMore>
+        <element name="condition">
+          <attribute name="class"><ref name="javaClassName"/></attribute>
+          <data type="string"/>
+        </element>
+      </oneOrMore>
+      <optional>
+        <element name="assign">
+          <attribute name="variable"><ref name="simpleNameToken"/></attribute>
+          <attribute name="value">
+            <ref name="booleanString"/>
+          </attribute>
+        </element>
+      </optional>
+    </element>
+  </oneOrMore>
+</element>
+
+</start>
+</grammar>
\ No newline at end of file

Modified: lenya/trunk/src/targets/webapp-build.xml
URL: http://svn.apache.org/viewvc/lenya/trunk/src/targets/webapp-build.xml?view=diff&rev=565263&r1=565262&r2=565263
==============================================================================
--- lenya/trunk/src/targets/webapp-build.xml (original)
+++ lenya/trunk/src/targets/webapp-build.xml Mon Aug 13 01:08:39 2007
@@ -74,6 +74,9 @@
     <jing rngfile="${src.resource.dir}/build/publication.rng">
       <fileset dir="${build.webapp}" includes="lenya/pubs/*/config/publication.xml"/>
     </jing>
+    <jing rngfile="${src.resource.dir}/build/workflow.rng">
+      <fileset dir="${build.webapp}" includes="lenya/pubs/*/config/workflow/workflow.xml"/>    
+    </jing>
     
     <bulkCopy 
       sourcedirs="${pubs.root.dirs}" 

Modified: lenya/trunk/src/webapp/readme.xml
URL: http://svn.apache.org/viewvc/lenya/trunk/src/webapp/readme.xml?view=diff&rev=565263&r1=565262&r2=565263
==============================================================================
--- lenya/trunk/src/webapp/readme.xml (original)
+++ lenya/trunk/src/webapp/readme.xml Mon Aug 13 01:08:39 2007
@@ -35,6 +35,16 @@
     </p>
     
     <h2>Important notes for beta testers of Lenya 2.0</h2>
+
+    <h3>2007-08-13: Workflow schema validation fixed</h3>
+    <p>
+      The old XSD-based schema validation in <code>workflow.xml</code> was
+    never used. It has now been ported to RNG for consistency and is applied to your custom
+      workflows during deployment. You will need to remove the
+    <code>xsi:schemaLocation</code> attribute (and you can then also remove
+      the <code>xmlns:xsi</code> declaration) from your custom publications'
+      <code>config/workflow/workflow.xml</code> if you have defined one.
+    </p>    
     
     <h3>2007-08-12: Resource type configuration changed</h3>
     <p>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.