You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by cr...@apache.org on 2006/03/23 06:17:19 UTC
svn commit: r388041 [6/10] - in /cocoon/trunk: ./
cocoon-ajax/cocoon-ajax-impl/src/main/java/org/apache/cocoon/ajax/resources/macros/
cocoon-ajax/cocoon-ajax-impl/src/main/java/org/apache/cocoon/ajax/resources/xslt/
cocoon-ajax/cocoon-ajax-sample/src/m...
Modified: cocoon/trunk/src/schema/deploy-schema-1.0.xsd
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/schema/deploy-schema-1.0.xsd?rev=388041&r1=388040&r2=388041&view=diff
==============================================================================
--- cocoon/trunk/src/schema/deploy-schema-1.0.xsd (original)
+++ cocoon/trunk/src/schema/deploy-schema-1.0.xsd Wed Mar 22 21:16:59 2006
@@ -1,91 +1,91 @@
-<?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="use" minOccurs="0" maxOccurs="unbounded"/>
- <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="use">
- <xs:complexType>
- <xs:attribute name="interface" type="xs:anyURI" use="required"/>
- <xs:attribute name="block" type="xs:anyURI" use="required"/>
- </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>
+<?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="use" minOccurs="0" maxOccurs="unbounded"/>
+ <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="use">
+ <xs:complexType>
+ <xs:attribute name="interface" type="xs:anyURI" use="required"/>
+ <xs:attribute name="block" type="xs:anyURI" use="required"/>
+ </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
------------------------------------------------------------------------------
svn:eol-style = native
Modified: cocoon/trunk/src/schema/test-block.xml
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/schema/test-block.xml?rev=388041&r1=388040&r2=388041&view=diff
==============================================================================
--- cocoon/trunk/src/schema/test-block.xml (original)
+++ cocoon/trunk/src/schema/test-block.xml Wed Mar 22 21:16:59 2006
@@ -1,53 +1,53 @@
-<?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="http://cocoon.apache.org/blocks/anyblock/1.0">
- <name>anyblock</name>
- <description href="http://cocoon.apache.org/blocks/anyblock/1.0">
- A block based on the Apache Cocoon portal
- </description>
- <state
- href="http://cocoon.apache.org/blocks/anyblock/1.0/state.html"
- community="committed"
- interfaces="unstable"
- implementation="stable"/>
- <license href="http://www.apache.org/licenses/">Apache License 2.0</license>
- <author href="http://cocoon.apache.org">Apache Cocoon community</author>
- <sitemap src="sitemap.xmap"/>
+<?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="http://cocoon.apache.org/blocks/anyblock/1.0">
+ <name>anyblock</name>
+ <description href="http://cocoon.apache.org/blocks/anyblock/1.0">
+ A block based on the Apache Cocoon portal
+ </description>
+ <state
+ href="http://cocoon.apache.org/blocks/anyblock/1.0/state.html"
+ community="committed"
+ interfaces="unstable"
+ implementation="stable"/>
+ <license href="http://www.apache.org/licenses/">Apache License 2.0</license>
+ <author href="http://cocoon.apache.org">Apache Cocoon community</author>
+ <sitemap src="sitemap.xmap"/>
<properties>
- <property name="mailserver">
- <default>localhost</default>
- <description>The IP adress or the DNS name of a server that can send mails.</description>
- </property>
- <property name="foo">
- <description>bar</description>
+ <property name="mailserver">
+ <default>localhost</default>
+ <description>The IP adress or the DNS name of a server that can send mails.</description>
</property>
- </properties>
+ <property name="foo">
+ <description>bar</description>
+ </property>
+ </properties>
<requirements>
- <requires
- interface="http://cocoon.apache.org/interface/portal/1.0"
- name="portal"
- default="http://cocoon.apache.org/blocks/portal/1.0.2"
+ <requires
+ interface="http://cocoon.apache.org/interface/portal/1.0"
+ name="portal"
+ default="http://cocoon.apache.org/blocks/portal/1.0.2"
/>
- </requirements>
- <extends block="http://cocoon.apache.org/blocks/another-block/1.0"/>
- <implements>
- <interface id="http://cocoon.apache.org/interface/bla/1.0"/>
- </implements>
+ </requirements>
+ <extends block="http://cocoon.apache.org/blocks/another-block/1.0"/>
+ <implements>
+ <interface id="http://cocoon.apache.org/interface/bla/1.0"/>
+ </implements>
</block>
Propchange: cocoon/trunk/src/schema/test-block.xml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: cocoon/trunk/src/schema/test-deploy.xml
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/schema/test-deploy.xml?rev=388041&r1=388040&r2=388041&view=diff
==============================================================================
--- cocoon/trunk/src/schema/test-deploy.xml (original)
+++ cocoon/trunk/src/schema/test-deploy.xml Wed Mar 22 21:16:59 2006
@@ -1,41 +1,41 @@
-<?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>
- <!-- install Cocoon 2.2 at d:\ -->
- <cocoon version="2.2" target-uri="d:\"/>
- <!-- install this block and set the property xyz and define which
- block implementations should be used for the defined requirements
- this overrides the default values set in block.xml -->
- <block id="http://mycompany.com/webmail/1.3.43" auto-resolve="false">
- <use block="http://mycompany.com/myblock/1.3.43" interface="http://bla/1.0" />
- <use block="http://mycompany.com/myOtherBlock/1.3.43" interface="http://bar/1.0" />
- <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>
+<?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>
+ <!-- install Cocoon 2.2 at d:\ -->
+ <cocoon version="2.2" target-uri="d:\"/>
+ <!-- install this block and set the property xyz and define which
+ block implementations should be used for the defined requirements
+ this overrides the default values set in block.xml -->
+ <block id="http://mycompany.com/webmail/1.3.43" auto-resolve="false">
+ <use block="http://mycompany.com/myblock/1.3.43" interface="http://bla/1.0" />
+ <use block="http://mycompany.com/myOtherBlock/1.3.43" interface="http://bar/1.0" />
+ <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>
Propchange: cocoon/trunk/src/schema/test-deploy.xml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: cocoon/trunk/src/schema/test-wiring.xml
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/schema/test-wiring.xml?rev=388041&r1=388040&r2=388041&view=diff
==============================================================================
--- cocoon/trunk/src/schema/test-wiring.xml (original)
+++ cocoon/trunk/src/schema/test-wiring.xml Wed Mar 22 21:16:59 2006
@@ -1,41 +1,41 @@
-<?xml version="1.0"?>
-<!--
- 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="000001">
- <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="000002">
- <properties>
- <property name="host" value="mail.blah.org"/>
- </properties>
- </block>
- <block id="http://yetanothercompany.com/skins/fancy/1.2.2" location="000003"/>
- <block id="http://mycompany.com/skins/corporate/34.3.345" location="000004"/>
+<?xml version="1.0"?>
+<!--
+ 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="000001">
+ <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="000002">
+ <properties>
+ <property name="host" value="mail.blah.org"/>
+ </properties>
+ </block>
+ <block id="http://yetanothercompany.com/skins/fancy/1.2.2" location="000003"/>
+ <block id="http://mycompany.com/skins/corporate/34.3.345" location="000004"/>
</wiring>
Propchange: cocoon/trunk/src/schema/test-wiring.xml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: cocoon/trunk/src/schema/wiring-schema-1.0.xsd
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/schema/wiring-schema-1.0.xsd?rev=388041&r1=388040&r2=388041&view=diff
==============================================================================
--- cocoon/trunk/src/schema/wiring-schema-1.0.xsd (original)
+++ cocoon/trunk/src/schema/wiring-schema-1.0.xsd Wed Mar 22 21:16:59 2006
@@ -1,32 +1,32 @@
-<?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 minOccurs="0">
- <xs:element name="block" type="block" maxOccurs="unbounded"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
-
+<?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 minOccurs="0">
+ <xs:element name="block" type="block" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+
<xs:complexType name="block">
<xs:all>
<xs:element name="mount" type="mount" minOccurs="0"/>
@@ -35,32 +35,32 @@
</xs:all>
<xs:attribute name="id" type="xs:anyURI" use="required"/>
<xs:attribute name="location" type="xs:anyURI" use="required"/>
- </xs:complexType>
-
+ </xs:complexType>
+
<xs:complexType name="mount">
<xs:attribute name="path" type="xs:string" use="required"/>
- </xs:complexType>
-
+ </xs:complexType>
+
<xs:complexType name="connections">
<xs:sequence>
<xs:element name="connection" type="connection" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
- </xs:complexType>
-
+ </xs:complexType>
+
<xs:complexType name="connection">
<xs:attribute name="name" type="xs:string" use="required"/>
<xs:attribute name="block" type="xs:anyURI" use="required"/>
- </xs:complexType>
-
+ </xs:complexType>
+
<xs:complexType name="properties">
<xs:sequence>
<xs:element name="property" type="property" minOccurs="1" maxOccurs="unbounded"/>
</xs:sequence>
- </xs:complexType>
-
+ </xs:complexType>
+
<xs:complexType name="property">
<xs:attribute name="name" type="xs:string" use="required"/>
<xs:attribute name="value" type="xs:string" use="required"/>
- </xs:complexType>
-
-</xs:schema>
+ </xs:complexType>
+
+</xs:schema>
Propchange: cocoon/trunk/src/schema/wiring-schema-1.0.xsd
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/trunk/src/test/anteater/flowscript-dom-dump.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/trunk/src/test/anteater/sitemapAnnotationsFilter.xml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: cocoon/trunk/tools/block-builder/java/org/apache/cocoon/blockbuilder/ant/Block.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/tools/block-builder/java/org/apache/cocoon/blockbuilder/ant/Block.java?rev=388041&r1=388040&r2=388041&view=diff
==============================================================================
--- cocoon/trunk/tools/block-builder/java/org/apache/cocoon/blockbuilder/ant/Block.java (original)
+++ cocoon/trunk/tools/block-builder/java/org/apache/cocoon/blockbuilder/ant/Block.java Wed Mar 22 21:16:59 2006
@@ -1,110 +1,110 @@
-/*
- * Copyright 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.
- */
-package org.apache.cocoon.blockbuilder.ant;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FilenameFilter;
-
-import org.apache.tools.ant.BuildException;
-import org.apache.xerces.parsers.DOMParser;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.InputSource;
-
-/**
- * @since 0.1
- */
-public class Block {
-
- private String name;
- private String relativeJardir;
- private String blockPath;
- private boolean dynamicEclipseReference = false;
-
- public Block() {
-
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getName() {
- return this.name;
- }
-
- public void setPath(String path) {
- this.blockPath = path;
- }
-
- public void setJardir(String dir) {
- this.relativeJardir = dir;
- }
-
- public void setDynamicEclipseReference(boolean dynamicEclipseReference) {
- this.dynamicEclipseReference = dynamicEclipseReference;
- }
-
- public boolean isDynamicEclipseReference() {
- return this.dynamicEclipseReference;
- }
-
- public String getEclipseProjectName() throws Exception {
- return getProjectName(new File(this.blockPath, ".project"));
- }
-
- public File[] getJarFile(File basedir) {
- File jarDir = new File(basedir, blockPath + File.separator + this.relativeJardir);
- return jarDir.listFiles(new FilenameFilter() {
- public boolean accept(File f, String name) {
- return name.toLowerCase().endsWith("jar");
- }
- });
- }
-
- private String getProjectName(File eclipseProjectFile) throws Exception {
- String projectName = "";
- try {
- String EL_PROJECTDESCRIPTION = "projectDescription";
- String EL_NAME = "name";
-
- DOMParser parser = new DOMParser();
- parser.parse(new InputSource(new FileInputStream(eclipseProjectFile)));
- Document doc = parser.getDocument();
-
- // read in all available libraries
- NodeList rootNodeList = doc.getChildNodes();
- for(int i = 0; i <= rootNodeList.getLength(); i++ ) {
- Node rootChildNode = rootNodeList.item(i);
- if(rootChildNode != null && EL_PROJECTDESCRIPTION.equals(rootChildNode.getLocalName())) {
- NodeList projectDescriptor = rootChildNode.getChildNodes();
- for(int x = 0; x <= projectDescriptor.getLength(); x++) {
- Node nameNode = projectDescriptor.item(x);
- if(nameNode != null && EL_NAME.equals(nameNode.getLocalName())) {
- projectName = nameNode.getFirstChild().getNodeValue();
- }
- }
- }
- }
- } catch(Exception e) {
- throw new BuildException("Make sure that a valid Eclipse project file can be found at "
- + eclipseProjectFile.getCanonicalPath());
- }
- return projectName;
- }
-}
+/*
+ * Copyright 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.
+ */
+package org.apache.cocoon.blockbuilder.ant;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FilenameFilter;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.xerces.parsers.DOMParser;
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.InputSource;
+
+/**
+ * @since 0.1
+ */
+public class Block {
+
+ private String name;
+ private String relativeJardir;
+ private String blockPath;
+ private boolean dynamicEclipseReference = false;
+
+ public Block() {
+
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public void setPath(String path) {
+ this.blockPath = path;
+ }
+
+ public void setJardir(String dir) {
+ this.relativeJardir = dir;
+ }
+
+ public void setDynamicEclipseReference(boolean dynamicEclipseReference) {
+ this.dynamicEclipseReference = dynamicEclipseReference;
+ }
+
+ public boolean isDynamicEclipseReference() {
+ return this.dynamicEclipseReference;
+ }
+
+ public String getEclipseProjectName() throws Exception {
+ return getProjectName(new File(this.blockPath, ".project"));
+ }
+
+ public File[] getJarFile(File basedir) {
+ File jarDir = new File(basedir, blockPath + File.separator + this.relativeJardir);
+ return jarDir.listFiles(new FilenameFilter() {
+ public boolean accept(File f, String name) {
+ return name.toLowerCase().endsWith("jar");
+ }
+ });
+ }
+
+ private String getProjectName(File eclipseProjectFile) throws Exception {
+ String projectName = "";
+ try {
+ String EL_PROJECTDESCRIPTION = "projectDescription";
+ String EL_NAME = "name";
+
+ DOMParser parser = new DOMParser();
+ parser.parse(new InputSource(new FileInputStream(eclipseProjectFile)));
+ Document doc = parser.getDocument();
+
+ // read in all available libraries
+ NodeList rootNodeList = doc.getChildNodes();
+ for(int i = 0; i <= rootNodeList.getLength(); i++ ) {
+ Node rootChildNode = rootNodeList.item(i);
+ if(rootChildNode != null && EL_PROJECTDESCRIPTION.equals(rootChildNode.getLocalName())) {
+ NodeList projectDescriptor = rootChildNode.getChildNodes();
+ for(int x = 0; x <= projectDescriptor.getLength(); x++) {
+ Node nameNode = projectDescriptor.item(x);
+ if(nameNode != null && EL_NAME.equals(nameNode.getLocalName())) {
+ projectName = nameNode.getFirstChild().getNodeValue();
+ }
+ }
+ }
+ }
+ } catch(Exception e) {
+ throw new BuildException("Make sure that a valid Eclipse project file can be found at "
+ + eclipseProjectFile.getCanonicalPath());
+ }
+ return projectName;
+ }
+}
Propchange: cocoon/trunk/tools/block-builder/java/org/apache/cocoon/blockbuilder/ant/Block.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: cocoon/trunk/tools/block-builder/java/org/apache/cocoon/blockbuilder/ant/Cocoon.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/tools/block-builder/java/org/apache/cocoon/blockbuilder/ant/Cocoon.java?rev=388041&r1=388040&r2=388041&view=diff
==============================================================================
--- cocoon/trunk/tools/block-builder/java/org/apache/cocoon/blockbuilder/ant/Cocoon.java (original)
+++ cocoon/trunk/tools/block-builder/java/org/apache/cocoon/blockbuilder/ant/Cocoon.java Wed Mar 22 21:16:59 2006
@@ -1,37 +1,37 @@
-/*
- * Copyright 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.
- */
-package org.apache.cocoon.blockbuilder.ant;
-
-/**
- * @since 0.1
- */
-public class Cocoon {
-
- private String jar;
-
- /**
- * @return Returns the dir.
- */
- public String getJar() {
- return jar;
- }
- /**
- * @param dir The dir to set.
- */
- public void setJar(String jar) {
- this.jar = jar;
- }
-}
+/*
+ * Copyright 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.
+ */
+package org.apache.cocoon.blockbuilder.ant;
+
+/**
+ * @since 0.1
+ */
+public class Cocoon {
+
+ private String jar;
+
+ /**
+ * @return Returns the dir.
+ */
+ public String getJar() {
+ return jar;
+ }
+ /**
+ * @param dir The dir to set.
+ */
+ public void setJar(String jar) {
+ this.jar = jar;
+ }
+}
Propchange: cocoon/trunk/tools/block-builder/java/org/apache/cocoon/blockbuilder/ant/Cocoon.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: cocoon/trunk/tools/block-builder/java/org/apache/cocoon/blockbuilder/ant/Descriptor.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/tools/block-builder/java/org/apache/cocoon/blockbuilder/ant/Descriptor.java?rev=388041&r1=388040&r2=388041&view=diff
==============================================================================
--- cocoon/trunk/tools/block-builder/java/org/apache/cocoon/blockbuilder/ant/Descriptor.java (original)
+++ cocoon/trunk/tools/block-builder/java/org/apache/cocoon/blockbuilder/ant/Descriptor.java Wed Mar 22 21:16:59 2006
@@ -1,34 +1,34 @@
-/*
- * Copyright 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.
- */
-package org.apache.cocoon.blockbuilder.ant;
-
-import java.io.File;
-
-/**
- * @since 0.1
- */
-public class Descriptor {
-
- File file;
-
- public void setFile(File file) {
- this.file = file;
- }
-
- public File getFile() {
- return this.file;
- }
-}
+/*
+ * Copyright 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.
+ */
+package org.apache.cocoon.blockbuilder.ant;
+
+import java.io.File;
+
+/**
+ * @since 0.1
+ */
+public class Descriptor {
+
+ File file;
+
+ public void setFile(File file) {
+ this.file = file;
+ }
+
+ public File getFile() {
+ return this.file;
+ }
+}
Propchange: cocoon/trunk/tools/block-builder/java/org/apache/cocoon/blockbuilder/ant/Descriptor.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: cocoon/trunk/tools/block-builder/java/org/apache/cocoon/blockbuilder/ant/EclipseClasspathBuilderTask.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/tools/block-builder/java/org/apache/cocoon/blockbuilder/ant/EclipseClasspathBuilderTask.java?rev=388041&r1=388040&r2=388041&view=diff
==============================================================================
--- cocoon/trunk/tools/block-builder/java/org/apache/cocoon/blockbuilder/ant/EclipseClasspathBuilderTask.java (original)
+++ cocoon/trunk/tools/block-builder/java/org/apache/cocoon/blockbuilder/ant/EclipseClasspathBuilderTask.java Wed Mar 22 21:16:59 2006
@@ -1,254 +1,254 @@
-/*
- * Copyright 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.
- */
-package org.apache.cocoon.blockbuilder.ant;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Task;
-import org.apache.xerces.dom.DocumentImpl;
-import org.apache.xerces.parsers.DOMParser;
-import org.apache.xml.serialize.OutputFormat;
-import org.apache.xml.serialize.XMLSerializer;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.InputSource;
-
-/**
- * @since 0.1
- */
-public class EclipseClasspathBuilderTask extends Task {
-
- private static final String EL_JARS = "jars";
- private static final String EL_FILE = "file";
- private static final String ATTR_ID = "id";
- private static final String EL_LIB = "lib";
- private static final String EL_CLASSPATH = "classpath";
- private static final String EL_CLASSPATHENTRY = "classpathentry";
- private static final String ATTR_PATH = "path";
- private static final String ATTR_KIND = "kind";
- private static final String ATTR_OUT = "output";
- private static final String LIT_ATTR_KIND_SRC = "src";
- private static final String LIT_ATTR_KIND_CON = "con";
- private static final String LIT_ATTR_KIND_LIB = "lib";
- // private static final String LIT_ATTR_KIND_OUT = "output";
- private static final String CORE_LIB = "core";
- private static final String DEFAULT_ECLIPSE_CONTAINER = "org.eclipse.jdt.launching.JRE_CONTAINER";
-
- private List blocks = new ArrayList();
- private Map coreJarMap = new HashMap();
- private List libs = new ArrayList();
- private List sources = new ArrayList();
- private List cocoonJars = new ArrayList();
- private File corejarsFile;
- private File outFile;
- private File coreJarDir;
- private String eclipseContainer = DEFAULT_ECLIPSE_CONTAINER;
-
-
- public void execute() throws BuildException {
- try {
-
- // create a new document
- Document doc= new DocumentImpl();
- Element root = doc.createElement(EL_CLASSPATH);
-
- // append all source directories
- Iterator sourceIterator = this.sources.iterator();
- while(sourceIterator.hasNext()) {
- Source source = ((Source) sourceIterator.next());
- Element entry = doc.createElement(EL_CLASSPATHENTRY);
- entry.setAttribute(ATTR_KIND, LIT_ATTR_KIND_SRC);
- entry.setAttribute(ATTR_PATH, source.getDir());
- entry.setAttribute(ATTR_OUT, source.getOut());
- root.appendChild(entry);
- }
-
- // append cocoon libraries
- Iterator cocoonIterator = this.cocoonJars.iterator();
- while(cocoonIterator.hasNext()) {
- Cocoon cocoonEntry = (Cocoon) cocoonIterator.next();
- File jar = new File(this.getProject().getBaseDir(), cocoonEntry.getJar());
- Element entry = doc.createElement(EL_CLASSPATHENTRY);
- entry.setAttribute(ATTR_KIND, LIT_ATTR_KIND_LIB);
- entry.setAttribute(ATTR_PATH, jar.getCanonicalPath());
- root.appendChild(entry);
- }
-
- // append all public block jars
- Iterator blockIterator = this.blocks.iterator();
- while(blockIterator.hasNext()) {
- Block block = (Block)blockIterator.next();
- if(!block.isDynamicEclipseReference()) {
- File[] f = block.getJarFile(this.getProject().getBaseDir());
- if(f!=null) for(int i = 0; i < f.length; i++) {
- Element entry = doc.createElement(EL_CLASSPATHENTRY);
- entry.setAttribute(ATTR_KIND, LIT_ATTR_KIND_LIB);
- entry.setAttribute(ATTR_PATH, f[i].getCanonicalPath());
- root.appendChild(entry);
- }
- } else {
- Element entry = doc.createElement(EL_CLASSPATHENTRY);
- entry.setAttribute(ATTR_KIND, LIT_ATTR_KIND_SRC);
- entry.setAttribute(ATTR_PATH, "/" + block.getEclipseProjectName());
- root.appendChild(entry);
- }
- }
-
- // append all libraries
- Iterator libIterator = this.libs.iterator();
- while(libIterator.hasNext()) {
- Library lib = (Library) libIterator.next();
- if(CORE_LIB.equals(lib.getLocation())) {
- String libFromRepository = (String) this.coreJarMap.get(lib.getId());
- if(libFromRepository == null) {
- throw new BuildException("Library '" + lib.getId() + "' can't be found! " +
- "Make sure it is available in " + corejarsFile.getCanonicalPath() + ".");
- }
- String jar = (new File(this.coreJarDir, libFromRepository)).getCanonicalPath();
- Element entry = doc.createElement(EL_CLASSPATHENTRY);
- entry.setAttribute(ATTR_KIND, LIT_ATTR_KIND_LIB);
- entry.setAttribute(ATTR_PATH, jar);
- root.appendChild(entry);
- }
- }
-
- // append default output dir
- /* RP: is it really necessary?
- Element outputEntry = doc.createElement(EL_CLASSPATHENTRY);
- outputEntry.setAttribute(ATTR_KIND, LIT_ATTR_KIND_OUT);
- outputEntry.setAttribute(ATTR_PATH, "");
- root.appendChild(outputEntry);
- */
-
- // append container
- Element containerEntry = doc.createElement(EL_CLASSPATHENTRY);
- containerEntry.setAttribute(ATTR_KIND, LIT_ATTR_KIND_CON);
- containerEntry.setAttribute(ATTR_PATH, this.eclipseContainer);
- root.appendChild(containerEntry);
-
- // append root element to document
- doc.appendChild(root);
-
- // serialize document
- FileOutputStream fos = new FileOutputStream(outFile);
- OutputFormat of = new OutputFormat("XML","UTF-8",true);
- of.setIndent(1);
- of.setIndenting(true);
- XMLSerializer serializer = new XMLSerializer(fos,of);
-
- serializer.asDOMSerializer();
- serializer.serialize( doc.getDocumentElement() );
- fos.close();
- this.log("Wrote Eclipse .classpath file sucessfully.");
-
- } catch(BuildException ex) {
- throw ex;
- }catch(Exception ex) {
- throw new BuildException("error while serializing dom tree: " + ex.getMessage());
- }
-
-
- }
-
-
- /**
- * Parse the jars.xml file and use addCoreJar() method to create an ArrayList with
- * all available jars.
- *
- * @param file
- * @throws Exception
- */
- private void parseJarXML(File file) throws Exception {
- DOMParser parser = new DOMParser();
- parser.parse(new InputSource(new FileInputStream(file)));
- Document doc = parser.getDocument();
-
- // read in all available libraries
- NodeList rootNodeList = doc.getChildNodes();
- for(int i = 0; i <= rootNodeList.getLength(); i++ ) {
- Node rootChildNode = rootNodeList.item(i);
- if(rootChildNode != null && EL_JARS.equals(rootChildNode.getLocalName())) {
- NodeList jarsNodeList = rootChildNode.getChildNodes();
- for(int x = 0; x <= jarsNodeList.getLength(); x++) {
- Node fileNode = jarsNodeList.item(x);
- if(fileNode != null && EL_FILE.equals(fileNode.getLocalName())) {
- addCoreJar(fileNode, this.coreJarMap);
- }
- }
- }
- }
-
- }
-
- private void addCoreJar(Node fileNode, Map jarMap) {
- String id = fileNode.getAttributes().getNamedItem(ATTR_ID).getNodeValue();
- NodeList fileNodeList = fileNode.getChildNodes();
- for(int x = 0; x <= fileNodeList.getLength(); x++) {
- Node childNode = fileNodeList.item(x);
- if(childNode != null && EL_LIB.equals(childNode.getLocalName())) {
- String libValue = childNode.getFirstChild().getNodeValue();
- jarMap.put(id, libValue);
- }
- }
- }
-
- public void setCorejardir(File dir) {
- this.coreJarDir = dir;
- }
-
- public void setCorejars(File corejars) throws Exception {
- this.corejarsFile = corejars;
- if(!this.corejarsFile.exists()) {
- throw new BuildException(this.corejarsFile.getCanonicalPath() + " can't be found.");
- }
- parseJarXML(this.corejarsFile);
- }
-
- public void setContainer(String container) {
- this.eclipseContainer = container;
- }
-
- public void setOutfile(File outfile) {
- this.outFile = outfile;
- }
-
- public void addLib(Library lib) throws BuildException {
- this.libs.add(lib);
- }
-
- public void addBlock(Block block) {
- blocks.add(block);
- }
-
- public void addSource(Source source) {
- sources.add(source);
- }
-
- public void addCocoon(Cocoon cocoon) {
- this.cocoonJars.add(cocoon);
- }
-
-}
+/*
+ * Copyright 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.
+ */
+package org.apache.cocoon.blockbuilder.ant;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Task;
+import org.apache.xerces.dom.DocumentImpl;
+import org.apache.xerces.parsers.DOMParser;
+import org.apache.xml.serialize.OutputFormat;
+import org.apache.xml.serialize.XMLSerializer;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.InputSource;
+
+/**
+ * @since 0.1
+ */
+public class EclipseClasspathBuilderTask extends Task {
+
+ private static final String EL_JARS = "jars";
+ private static final String EL_FILE = "file";
+ private static final String ATTR_ID = "id";
+ private static final String EL_LIB = "lib";
+ private static final String EL_CLASSPATH = "classpath";
+ private static final String EL_CLASSPATHENTRY = "classpathentry";
+ private static final String ATTR_PATH = "path";
+ private static final String ATTR_KIND = "kind";
+ private static final String ATTR_OUT = "output";
+ private static final String LIT_ATTR_KIND_SRC = "src";
+ private static final String LIT_ATTR_KIND_CON = "con";
+ private static final String LIT_ATTR_KIND_LIB = "lib";
+ // private static final String LIT_ATTR_KIND_OUT = "output";
+ private static final String CORE_LIB = "core";
+ private static final String DEFAULT_ECLIPSE_CONTAINER = "org.eclipse.jdt.launching.JRE_CONTAINER";
+
+ private List blocks = new ArrayList();
+ private Map coreJarMap = new HashMap();
+ private List libs = new ArrayList();
+ private List sources = new ArrayList();
+ private List cocoonJars = new ArrayList();
+ private File corejarsFile;
+ private File outFile;
+ private File coreJarDir;
+ private String eclipseContainer = DEFAULT_ECLIPSE_CONTAINER;
+
+
+ public void execute() throws BuildException {
+ try {
+
+ // create a new document
+ Document doc= new DocumentImpl();
+ Element root = doc.createElement(EL_CLASSPATH);
+
+ // append all source directories
+ Iterator sourceIterator = this.sources.iterator();
+ while(sourceIterator.hasNext()) {
+ Source source = ((Source) sourceIterator.next());
+ Element entry = doc.createElement(EL_CLASSPATHENTRY);
+ entry.setAttribute(ATTR_KIND, LIT_ATTR_KIND_SRC);
+ entry.setAttribute(ATTR_PATH, source.getDir());
+ entry.setAttribute(ATTR_OUT, source.getOut());
+ root.appendChild(entry);
+ }
+
+ // append cocoon libraries
+ Iterator cocoonIterator = this.cocoonJars.iterator();
+ while(cocoonIterator.hasNext()) {
+ Cocoon cocoonEntry = (Cocoon) cocoonIterator.next();
+ File jar = new File(this.getProject().getBaseDir(), cocoonEntry.getJar());
+ Element entry = doc.createElement(EL_CLASSPATHENTRY);
+ entry.setAttribute(ATTR_KIND, LIT_ATTR_KIND_LIB);
+ entry.setAttribute(ATTR_PATH, jar.getCanonicalPath());
+ root.appendChild(entry);
+ }
+
+ // append all public block jars
+ Iterator blockIterator = this.blocks.iterator();
+ while(blockIterator.hasNext()) {
+ Block block = (Block)blockIterator.next();
+ if(!block.isDynamicEclipseReference()) {
+ File[] f = block.getJarFile(this.getProject().getBaseDir());
+ if(f!=null) for(int i = 0; i < f.length; i++) {
+ Element entry = doc.createElement(EL_CLASSPATHENTRY);
+ entry.setAttribute(ATTR_KIND, LIT_ATTR_KIND_LIB);
+ entry.setAttribute(ATTR_PATH, f[i].getCanonicalPath());
+ root.appendChild(entry);
+ }
+ } else {
+ Element entry = doc.createElement(EL_CLASSPATHENTRY);
+ entry.setAttribute(ATTR_KIND, LIT_ATTR_KIND_SRC);
+ entry.setAttribute(ATTR_PATH, "/" + block.getEclipseProjectName());
+ root.appendChild(entry);
+ }
+ }
+
+ // append all libraries
+ Iterator libIterator = this.libs.iterator();
+ while(libIterator.hasNext()) {
+ Library lib = (Library) libIterator.next();
+ if(CORE_LIB.equals(lib.getLocation())) {
+ String libFromRepository = (String) this.coreJarMap.get(lib.getId());
+ if(libFromRepository == null) {
+ throw new BuildException("Library '" + lib.getId() + "' can't be found! " +
+ "Make sure it is available in " + corejarsFile.getCanonicalPath() + ".");
+ }
+ String jar = (new File(this.coreJarDir, libFromRepository)).getCanonicalPath();
+ Element entry = doc.createElement(EL_CLASSPATHENTRY);
+ entry.setAttribute(ATTR_KIND, LIT_ATTR_KIND_LIB);
+ entry.setAttribute(ATTR_PATH, jar);
+ root.appendChild(entry);
+ }
+ }
+
+ // append default output dir
+ /* RP: is it really necessary?
+ Element outputEntry = doc.createElement(EL_CLASSPATHENTRY);
+ outputEntry.setAttribute(ATTR_KIND, LIT_ATTR_KIND_OUT);
+ outputEntry.setAttribute(ATTR_PATH, "");
+ root.appendChild(outputEntry);
+ */
+
+ // append container
+ Element containerEntry = doc.createElement(EL_CLASSPATHENTRY);
+ containerEntry.setAttribute(ATTR_KIND, LIT_ATTR_KIND_CON);
+ containerEntry.setAttribute(ATTR_PATH, this.eclipseContainer);
+ root.appendChild(containerEntry);
+
+ // append root element to document
+ doc.appendChild(root);
+
+ // serialize document
+ FileOutputStream fos = new FileOutputStream(outFile);
+ OutputFormat of = new OutputFormat("XML","UTF-8",true);
+ of.setIndent(1);
+ of.setIndenting(true);
+ XMLSerializer serializer = new XMLSerializer(fos,of);
+
+ serializer.asDOMSerializer();
+ serializer.serialize( doc.getDocumentElement() );
+ fos.close();
+ this.log("Wrote Eclipse .classpath file sucessfully.");
+
+ } catch(BuildException ex) {
+ throw ex;
+ }catch(Exception ex) {
+ throw new BuildException("error while serializing dom tree: " + ex.getMessage());
+ }
+
+
+ }
+
+
+ /**
+ * Parse the jars.xml file and use addCoreJar() method to create an ArrayList with
+ * all available jars.
+ *
+ * @param file
+ * @throws Exception
+ */
+ private void parseJarXML(File file) throws Exception {
+ DOMParser parser = new DOMParser();
+ parser.parse(new InputSource(new FileInputStream(file)));
+ Document doc = parser.getDocument();
+
+ // read in all available libraries
+ NodeList rootNodeList = doc.getChildNodes();
+ for(int i = 0; i <= rootNodeList.getLength(); i++ ) {
+ Node rootChildNode = rootNodeList.item(i);
+ if(rootChildNode != null && EL_JARS.equals(rootChildNode.getLocalName())) {
+ NodeList jarsNodeList = rootChildNode.getChildNodes();
+ for(int x = 0; x <= jarsNodeList.getLength(); x++) {
+ Node fileNode = jarsNodeList.item(x);
+ if(fileNode != null && EL_FILE.equals(fileNode.getLocalName())) {
+ addCoreJar(fileNode, this.coreJarMap);
+ }
+ }
+ }
+ }
+
+ }
+
+ private void addCoreJar(Node fileNode, Map jarMap) {
+ String id = fileNode.getAttributes().getNamedItem(ATTR_ID).getNodeValue();
+ NodeList fileNodeList = fileNode.getChildNodes();
+ for(int x = 0; x <= fileNodeList.getLength(); x++) {
+ Node childNode = fileNodeList.item(x);
+ if(childNode != null && EL_LIB.equals(childNode.getLocalName())) {
+ String libValue = childNode.getFirstChild().getNodeValue();
+ jarMap.put(id, libValue);
+ }
+ }
+ }
+
+ public void setCorejardir(File dir) {
+ this.coreJarDir = dir;
+ }
+
+ public void setCorejars(File corejars) throws Exception {
+ this.corejarsFile = corejars;
+ if(!this.corejarsFile.exists()) {
+ throw new BuildException(this.corejarsFile.getCanonicalPath() + " can't be found.");
+ }
+ parseJarXML(this.corejarsFile);
+ }
+
+ public void setContainer(String container) {
+ this.eclipseContainer = container;
+ }
+
+ public void setOutfile(File outfile) {
+ this.outFile = outfile;
+ }
+
+ public void addLib(Library lib) throws BuildException {
+ this.libs.add(lib);
+ }
+
+ public void addBlock(Block block) {
+ blocks.add(block);
+ }
+
+ public void addSource(Source source) {
+ sources.add(source);
+ }
+
+ public void addCocoon(Cocoon cocoon) {
+ this.cocoonJars.add(cocoon);
+ }
+
+}
Propchange: cocoon/trunk/tools/block-builder/java/org/apache/cocoon/blockbuilder/ant/EclipseClasspathBuilderTask.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: cocoon/trunk/tools/block-builder/java/org/apache/cocoon/blockbuilder/ant/Library.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/tools/block-builder/java/org/apache/cocoon/blockbuilder/ant/Library.java?rev=388041&r1=388040&r2=388041&view=diff
==============================================================================
--- cocoon/trunk/tools/block-builder/java/org/apache/cocoon/blockbuilder/ant/Library.java (original)
+++ cocoon/trunk/tools/block-builder/java/org/apache/cocoon/blockbuilder/ant/Library.java Wed Mar 22 21:16:59 2006
@@ -1,42 +1,42 @@
-/*
- * Copyright 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.
- */
-package org.apache.cocoon.blockbuilder.ant;
-
-/**
- * @since 0.1
- */
-public class Library {
-
- private String id;
- private String location;
-
- public void setId(String id) {
- this.id = id;
- }
-
- public String getId() {
- return this.id;
- }
-
- public void setLocation(String location) {
- this.location = location;
- }
-
- public String getLocation() {
- return this.location;
- }
-
-}
+/*
+ * Copyright 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.
+ */
+package org.apache.cocoon.blockbuilder.ant;
+
+/**
+ * @since 0.1
+ */
+public class Library {
+
+ private String id;
+ private String location;
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getId() {
+ return this.id;
+ }
+
+ public void setLocation(String location) {
+ this.location = location;
+ }
+
+ public String getLocation() {
+ return this.location;
+ }
+
+}
Propchange: cocoon/trunk/tools/block-builder/java/org/apache/cocoon/blockbuilder/ant/Library.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: cocoon/trunk/tools/block-builder/java/org/apache/cocoon/blockbuilder/ant/Source.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/tools/block-builder/java/org/apache/cocoon/blockbuilder/ant/Source.java?rev=388041&r1=388040&r2=388041&view=diff
==============================================================================
--- cocoon/trunk/tools/block-builder/java/org/apache/cocoon/blockbuilder/ant/Source.java (original)
+++ cocoon/trunk/tools/block-builder/java/org/apache/cocoon/blockbuilder/ant/Source.java Wed Mar 22 21:16:59 2006
@@ -1,41 +1,41 @@
-/*
- * Copyright 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.
- */
-package org.apache.cocoon.blockbuilder.ant;
-
-/**
- * @since 0.1
- */
-public class Source {
-
- String dir;
- String out;
-
-
- public String getOut() {
- return out;
- }
-
- public void setOut(String out) {
- this.out = out;
- }
- public String getDir() {
- return dir;
- }
-
- public void setDir(String dir) {
- this.dir = dir;
- }
-}
+/*
+ * Copyright 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.
+ */
+package org.apache.cocoon.blockbuilder.ant;
+
+/**
+ * @since 0.1
+ */
+public class Source {
+
+ String dir;
+ String out;
+
+
+ public String getOut() {
+ return out;
+ }
+
+ public void setOut(String out) {
+ this.out = out;
+ }
+ public String getDir() {
+ return dir;
+ }
+
+ public void setDir(String dir) {
+ this.dir = dir;
+ }
+}
Propchange: cocoon/trunk/tools/block-builder/java/org/apache/cocoon/blockbuilder/ant/Source.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/trunk/tools/block-builder/targets/block-descriptor2ant-script.xsl
------------------------------------------------------------------------------
svn:eol-style = native
Modified: cocoon/trunk/tools/block-builder/targets/block-descriptor2eclipse-project.xsl
URL: http://svn.apache.org/viewcvs/cocoon/trunk/tools/block-builder/targets/block-descriptor2eclipse-project.xsl?rev=388041&r1=388040&r2=388041&view=diff
==============================================================================
--- cocoon/trunk/tools/block-builder/targets/block-descriptor2eclipse-project.xsl (original)
+++ cocoon/trunk/tools/block-builder/targets/block-descriptor2eclipse-project.xsl Wed Mar 22 21:16:59 2006
@@ -1,6 +1,6 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="block" xmlns:block="http://apache.org/cocoon/blocks/cob/1.0" version="1.0">
- <xsl:template match="/">
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="block" xmlns:block="http://apache.org/cocoon/blocks/cob/1.0" version="1.0">
+ <xsl:template match="/">
<projectDescription>
<name>[COB] <xsl:value-of select="/block:block/block:name"/> v<xsl:value-of select="/block:block/block:name/@version"/></name>
<comment></comment>
@@ -16,6 +16,6 @@
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
- </projectDescription>
- </xsl:template>
-</xsl:stylesheet>
+ </projectDescription>
+ </xsl:template>
+</xsl:stylesheet>
Propchange: cocoon/trunk/tools/block-builder/targets/block-descriptor2eclipse-project.xsl
------------------------------------------------------------------------------
svn:eol-style = native
Modified: cocoon/trunk/tools/block-builder/targets/global.build.properties
URL: http://svn.apache.org/viewcvs/cocoon/trunk/tools/block-builder/targets/global.build.properties?rev=388041&r1=388040&r2=388041&view=diff
==============================================================================
--- cocoon/trunk/tools/block-builder/targets/global.build.properties (original)
+++ cocoon/trunk/tools/block-builder/targets/global.build.properties Wed Mar 22 21:16:59 2006
@@ -1,34 +1,34 @@
-# 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.
-#
-#----------------------------------------------
-# Build Properties
-#----------------------------------------------
-
-# ---- Paths -------------------------------------------------------------------
-src.public=java
-
-# ---- Build -------------------------------------------------------------------
-build.root=build
-build.public=${build.root}/public
-build.public.classes=${build.public}/classes
-
-# ---- Compiler ----------------------------------------------------------------
-compiler=modern
-compiler.debug=on
-compiler.optimize=on
-compiler.deprecation=off
-compiler.nowarn=on
-source.vm=1.3
+# 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.
+#
+#----------------------------------------------
+# Build Properties
+#----------------------------------------------
+
+# ---- Paths -------------------------------------------------------------------
+src.public=java
+
+# ---- Build -------------------------------------------------------------------
+build.root=build
+build.public=${build.root}/public
+build.public.classes=${build.public}/classes
+
+# ---- Compiler ----------------------------------------------------------------
+compiler=modern
+compiler.debug=on
+compiler.optimize=on
+compiler.deprecation=off
+compiler.nowarn=on
+source.vm=1.3
target.vm=1.3
Propchange: cocoon/trunk/tools/block-builder/targets/global.build.properties
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/trunk/tools/external-project-build/generic-build.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/trunk/tools/jetty/conf/admin-jmx.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/trunk/tools/jetty/conf/jetty-start.config
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/trunk/tools/jetty/conf/main-jmx.xml
------------------------------------------------------------------------------
svn:eol-style = native