Skip to Content.
Sympa Menu

notify-dpml - r1592 - in trunk/main: depot/library/etc/data depot/library/etc/data/samples depot/library/src/main/net/dpml/library/info external lang/module/etc

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: mcconnell at BerliOS <mcconnell AT mail.berlios.de>
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: r1592 - in trunk/main: depot/library/etc/data depot/library/etc/data/samples depot/library/src/main/net/dpml/library/info external lang/module/etc
  • Date: Wed, 19 Jul 2006 15:46:43 +0200

Author: mcconnell
Date: 2006-07-19 15:46:38 +0200 (Wed, 19 Jul 2006)
New Revision: 1592

Modified:
trunk/main/depot/library/etc/data/library.xml
trunk/main/depot/library/etc/data/samples/absolute.xml
trunk/main/depot/library/etc/data/samples/anonymous.xml
trunk/main/depot/library/etc/data/samples/duplicates.xml
trunk/main/depot/library/etc/data/samples/example-4.xml
trunk/main/depot/library/etc/data/samples/example-5.xml
trunk/main/depot/library/etc/data/samples/example-6.xml
trunk/main/depot/library/etc/data/samples/example-7.xml
trunk/main/depot/library/etc/data/samples/example-8.xml
trunk/main/depot/library/etc/data/samples/filters.xml
trunk/main/depot/library/etc/data/samples/info.xml
trunk/main/depot/library/etc/data/samples/jar-type.xml
trunk/main/depot/library/etc/data/samples/properties.xml
trunk/main/depot/library/src/main/net/dpml/library/info/LibraryDecoder.java
trunk/main/external/index.xml
trunk/main/lang/module/etc/module.xsd
Log:
update module xsd to enable module declarations within the scope of an index
element (i.e. <modules> element definition has been removed)

Modified: trunk/main/depot/library/etc/data/library.xml
===================================================================
--- trunk/main/depot/library/etc/data/library.xml 2006-07-19 09:28:29
UTC (rev 1591)
+++ trunk/main/depot/library/etc/data/library.xml 2006-07-19 13:46:38
UTC (rev 1592)
@@ -7,13 +7,11 @@
<property name="project.template" value="${project.standard.template}"/>
</properties>

- <modules>
- <module file="junit/module.xml"/>
- <module file="commons-cli/module.xml"/>
- <module file="xstream/module.xml"/>
- <module file="jgoodies/module.xml"/>
- <module file="dpml/module.xml"/>
- <module file="ant/module.xml"/>
- </modules>
+ <module file="junit/module.xml"/>
+ <module file="commons-cli/module.xml"/>
+ <module file="xstream/module.xml"/>
+ <module file="jgoodies/module.xml"/>
+ <module file="dpml/module.xml"/>
+ <module file="ant/module.xml"/>

</index>

Modified: trunk/main/depot/library/etc/data/samples/absolute.xml
===================================================================
--- trunk/main/depot/library/etc/data/samples/absolute.xml 2006-07-19
09:28:29 UTC (rev 1591)
+++ trunk/main/depot/library/etc/data/samples/absolute.xml 2006-07-19
13:46:38 UTC (rev 1592)
@@ -1,11 +1,9 @@
<?xml version="1.0"?>
<index xmlns="@MODULE-XSD-URI@" >

- <modules>
<module name="gov/nsa/acme">
<info/>
<resource name="widget/gizmo"/>
</module>
- </modules>

</index>

Modified: trunk/main/depot/library/etc/data/samples/anonymous.xml
===================================================================
--- trunk/main/depot/library/etc/data/samples/anonymous.xml 2006-07-19
09:28:29 UTC (rev 1591)
+++ trunk/main/depot/library/etc/data/samples/anonymous.xml 2006-07-19
13:46:38 UTC (rev 1592)
@@ -7,7 +7,6 @@
<property name="project.template" value="${project.standard.template}"/>
</properties>

- <modules>
<module name="demo" basedir=".">

<properties>
@@ -27,6 +26,4 @@

</module>

- </modules>
-
</index>

Modified: trunk/main/depot/library/etc/data/samples/duplicates.xml
===================================================================
--- trunk/main/depot/library/etc/data/samples/duplicates.xml 2006-07-19
09:28:29 UTC (rev 1591)
+++ trunk/main/depot/library/etc/data/samples/duplicates.xml 2006-07-19
13:46:38 UTC (rev 1592)
@@ -2,7 +2,6 @@
<index xmlns="@MODULE-XSD-URI@"
xmlns:part="@PART-XSD-URI@">

- <modules>
<module name="acme">
<resource name="widget">
<types>
@@ -14,6 +13,7 @@
</types>
</resource>
</module>
+
<module name="acme">
<resource name="gizmo">
<types>
@@ -21,6 +21,5 @@
</types>
</resource>
</module>
- </modules>
-
+
</index>

Modified: trunk/main/depot/library/etc/data/samples/example-4.xml
===================================================================
--- trunk/main/depot/library/etc/data/samples/example-4.xml 2006-07-19
09:28:29 UTC (rev 1591)
+++ trunk/main/depot/library/etc/data/samples/example-4.xml 2006-07-19
13:46:38 UTC (rev 1592)
@@ -6,12 +6,12 @@
<import uri="link:module:ant"/>
</imports>

- <modules>
<module name="acme" basedir=".">
<module name="widget"/>
</module>
+
<module name="foo"/>
+
<module name="bar"/>
- </modules>

</index>

Modified: trunk/main/depot/library/etc/data/samples/example-5.xml
===================================================================
--- trunk/main/depot/library/etc/data/samples/example-5.xml 2006-07-19
09:28:29 UTC (rev 1591)
+++ trunk/main/depot/library/etc/data/samples/example-5.xml 2006-07-19
13:46:38 UTC (rev 1592)
@@ -6,7 +6,6 @@
<import uri="link:module:ant"/>
</imports>

- <modules>
<module name="acme" basedir=".">
<properties>
<property name="fred" value="wilma"/>
@@ -14,6 +13,5 @@
<property name="widget" value="gizmo"/>
</properties>
</module>
- </modules>

</index>

Modified: trunk/main/depot/library/etc/data/samples/example-6.xml
===================================================================
--- trunk/main/depot/library/etc/data/samples/example-6.xml 2006-07-19
09:28:29 UTC (rev 1591)
+++ trunk/main/depot/library/etc/data/samples/example-6.xml 2006-07-19
13:46:38 UTC (rev 1592)
@@ -6,8 +6,6 @@
<import uri="link:module:ant"/>
</imports>

- <modules>
<module file="widget.xml"/>
- </modules>

</index>

Modified: trunk/main/depot/library/etc/data/samples/example-7.xml
===================================================================
--- trunk/main/depot/library/etc/data/samples/example-7.xml 2006-07-19
09:28:29 UTC (rev 1591)
+++ trunk/main/depot/library/etc/data/samples/example-7.xml 2006-07-19
13:46:38 UTC (rev 1592)
@@ -6,10 +6,8 @@
<import uri="link:module:ant"/>
</imports>

- <modules>
<module name="acme">
<module file="widget.xml"/>
</module>
- </modules>

</index>

Modified: trunk/main/depot/library/etc/data/samples/example-8.xml
===================================================================
--- trunk/main/depot/library/etc/data/samples/example-8.xml 2006-07-19
09:28:29 UTC (rev 1591)
+++ trunk/main/depot/library/etc/data/samples/example-8.xml 2006-07-19
13:46:38 UTC (rev 1592)
@@ -8,7 +8,6 @@
<import uri="link:module:ant"/>
</imports>

- <modules>
<module name="acme">
<resource name="widget">
<types>
@@ -20,6 +19,5 @@
</types>
</resource>
</module>
- </modules>

</index>

Modified: trunk/main/depot/library/etc/data/samples/filters.xml
===================================================================
--- trunk/main/depot/library/etc/data/samples/filters.xml 2006-07-19
09:28:29 UTC (rev 1591)
+++ trunk/main/depot/library/etc/data/samples/filters.xml 2006-07-19
13:46:38 UTC (rev 1592)
@@ -3,7 +3,6 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:part="@PART-XSD-URI@">

- <modules>
<module name="acme">
<filters>
<filter token="PUBLISHER" value="ACME"/>
@@ -15,6 +14,5 @@
</filters>
</project>
</module>
- </modules>

</index>

Modified: trunk/main/depot/library/etc/data/samples/info.xml
===================================================================
--- trunk/main/depot/library/etc/data/samples/info.xml 2006-07-19 09:28:29
UTC (rev 1591)
+++ trunk/main/depot/library/etc/data/samples/info.xml 2006-07-19 13:46:38
UTC (rev 1592)
@@ -3,20 +3,22 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:part="@PART-XSD-URI@">

- <modules>
<module name="acme-1">
<info/>
</module>
+
<module name="acme-2">
<info>
<description/>
</info>
</module>
+
<module name="acme-3">
<info title="Widget">
<description/>
</info>
</module>
+
<module name="acme-4">
<info title="Widget">
<description>
@@ -24,6 +26,7 @@
</description>
</info>
</module>
+
<module name="acme-5">
<info>
<description>
@@ -31,6 +34,5 @@
</description>
</info>
</module>
- </modules>

</index>

Modified: trunk/main/depot/library/etc/data/samples/jar-type.xml
===================================================================
--- trunk/main/depot/library/etc/data/samples/jar-type.xml 2006-07-19
09:28:29 UTC (rev 1591)
+++ trunk/main/depot/library/etc/data/samples/jar-type.xml 2006-07-19
13:46:38 UTC (rev 1592)
@@ -3,7 +3,6 @@
<index xmlns="@MODULE-XSD-URI@"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>

- <modules>
<module name="acme">
<project name="widget" basedir=".">
<types>
@@ -23,60 +22,6 @@
</types>
</project>
</module>
- </modules>

- <!--
- <project name="widget" basedir=".">
- <data src="classic" work="target">
- <process xsi:type="normalization">
- <copy from="classic:src.main" to="target:build.main">
- <selection>
- <include name="**/*"/>
- </selection>
- <filtered>
- <include name="**/*.java"/>
- <include name="**/*.x*"/>
- <include name="**/*.properties"/>
- <include name="**/*.html"/>
- </filtered>
- </copy>
- <copy from="classic:src.test" to="target:build.test">
-
- </copy>
- <copy from="classic:etc.main" to="target:build.main"/>
- <copy from="classic:etc.test" to="target:build.test"/>
- <copy from="classic:etc.data" to="target:test"/>
- </process>
- <process xsi:type="compilation">
- <compile src="build.main" dest="compile.main"
- </process>
-
- <process xsi:type="selection" id="compile-main">
- <include name="**/*.java"/>
- </process>
- <type xsi:type="jar" compress="false" index="false"
depends="compile-main">
- <src>
- <include name="batman"/>
- <exclude name="robin"/>
- </src>
- <rmic>
- <include name="red"/>
- <include name="white"/>
- <include name="blue"/>
- <exclude name="pink"/>
- <exclude name="magenta"/>
- </rmic>
- </type>
- <process xsi:type="selection" id="prepare-test">
- <fileset dir="
- <include name="**/*.java"/>
- </process>
- <process xsi:type="selection" id="compile-test">
- <include name="**/*.java"/>
- </process>
- </data>
- </project>
- -->
-
</index>


Modified: trunk/main/depot/library/etc/data/samples/properties.xml
===================================================================
--- trunk/main/depot/library/etc/data/samples/properties.xml 2006-07-19
09:28:29 UTC (rev 1591)
+++ trunk/main/depot/library/etc/data/samples/properties.xml 2006-07-19
13:46:38 UTC (rev 1592)
@@ -1,7 +1,6 @@
<?xml version="1.0"?>
<index xmlns="@MODULE-XSD-URI@">

- <modules>
<module name="org">
<properties>
<property name="ping" value="pong"/>
@@ -13,6 +12,5 @@
</properties>
</module>
</module>
- </modules>

</index>

Modified:
trunk/main/depot/library/src/main/net/dpml/library/info/LibraryDecoder.java
===================================================================
---
trunk/main/depot/library/src/main/net/dpml/library/info/LibraryDecoder.java
2006-07-19 09:28:29 UTC (rev 1591)
+++
trunk/main/depot/library/src/main/net/dpml/library/info/LibraryDecoder.java
2006-07-19 13:46:38 UTC (rev 1592)
@@ -24,6 +24,7 @@
import java.io.FileNotFoundException;
import java.net.URI;
import java.net.URISyntaxException;
+import java.util.List;
import java.util.ArrayList;
import java.util.Properties;

@@ -153,7 +154,8 @@

Properties properties = null;
ImportDirective[] imports = new ImportDirective[0];
- ResourceDirective[] resources = new ResourceDirective[0];
+ List list = new ArrayList();
+ //ResourceDirective[] resources = new ResourceDirective[0];
Element[] children = ElementHelper.getChildren( element );
for( int i=0; i<children.length; i++ )
{
@@ -167,9 +169,11 @@
{
imports = buildImportDirectives( child );
}
- else if( MODULES_ELEMENT_NAME.equals( tag ) )
+ else if( MODULE_ELEMENT_NAME.equals( tag ) )
{
- resources = expandModulesElement( base, child );
+ ResourceDirective resource =
buildResourceDirectiveFromElement( base, child, null );
+ list.add( resource );
+ //resources = expandModulesElement( base, child );
}
else
{
@@ -178,6 +182,7 @@
throw new IllegalArgumentException( error );
}
}
+ ResourceDirective[] resources = (ResourceDirective[]) list.toArray(
new ResourceDirective[0] );
return new LibraryDirective( imports, resources, properties );
}

@@ -187,6 +192,7 @@
* @param base the basedir of the enclosing library or module
* @param element the element defining the module
*/
+ /*
private ResourceDirective[] expandModulesElement(
File base, Element element ) throws Exception
{
@@ -206,6 +212,7 @@
}
return resources;
}
+ */

/**
* Build a resource using an XML element.

Modified: trunk/main/external/index.xml
===================================================================
--- trunk/main/external/index.xml 2006-07-19 09:28:29 UTC (rev 1591)
+++ trunk/main/external/index.xml 2006-07-19 13:46:38 UTC (rev 1592)
@@ -2,8 +2,6 @@
<index xmlns="link:xsd:dpml/lang/dpml-module#1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; >

- <modules>
-
<module name="junit" version="3.8.1" basedir="junit">

<properties>
@@ -105,6 +103,4 @@

</module>

- </modules>
-
</index>

Modified: trunk/main/lang/module/etc/module.xsd
===================================================================
--- trunk/main/lang/module/etc/module.xsd 2006-07-19 09:28:29 UTC (rev
1591)
+++ trunk/main/lang/module/etc/module.xsd 2006-07-19 13:46:38 UTC (rev
1592)
@@ -14,11 +14,11 @@
<element name="type" type="this:GenericType"
substitutionGroup="this:typedef"/>

<complexType name="IndexType">
- <all>
+ <sequence>
<element name="imports" type="this:ImportsType" minOccurs="0"
maxOccurs="1"/>
<element name="properties" type="this:PropertiesType" minOccurs="0"
maxOccurs="1"/>
- <element name="modules" type="this:ModulesType" minOccurs="0"
maxOccurs="1"/>
- </all>
+ <element name="module" type="this:ModuleType" minOccurs="0"
maxOccurs="unbounded"/>
+ </sequence>
</complexType>

<complexType name="ImportsType">




  • r1592 - in trunk/main: depot/library/etc/data depot/library/etc/data/samples depot/library/src/main/net/dpml/library/info external lang/module/etc, mcconnell at BerliOS, 07/19/2006

Archive powered by MHonArc 2.6.24.

Top of Page