Author: julien_viet
Date: 2011-08-14 16:57:51 -0400 (Sun, 14 Aug 2011)
New Revision: 7120
Modified:
portal/trunk/component/portal/src/main/java/gatein_objects_1_2.xsd
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/TestXSDCorruption.java
Log:
factor out the common XML elements as applicationGroup in gatein object 1.2 XSD
Modified: portal/trunk/component/portal/src/main/java/gatein_objects_1_2.xsd
===================================================================
--- portal/trunk/component/portal/src/main/java/gatein_objects_1_2.xsd 2011-08-14 20:46:07
UTC (rev 7119)
+++ portal/trunk/component/portal/src/main/java/gatein_objects_1_2.xsd 2011-08-14 20:57:51
UTC (rev 7120)
@@ -180,22 +180,19 @@
<xs:element name="portlet" type="portletType"/>
<xs:element name="wsrp" type="xs:string"/>
</xs:choice>
- <xs:element name="theme" type="xs:string"
minOccurs="0" maxOccurs="1"/>
- <xs:element name="title" type="xs:string"
minOccurs="0" maxOccurs="1"/>
- <xs:element name="access-permissions" type="xs:string"
minOccurs="1" maxOccurs="1"/>
- <xs:element name="show-info-bar" type="xs:boolean"
minOccurs="1" maxOccurs="1"/>
- <xs:element name="show-application-state"
type="xs:boolean" minOccurs="0" maxOccurs="1"/>
- <xs:element name="show-application-mode"
type="xs:boolean" minOccurs="0" maxOccurs="1"/>
- <xs:element name="description" type="xs:string"
minOccurs="0" maxOccurs="1"/>
- <xs:element name="icon" type="xs:string"
minOccurs="0" maxOccurs="1"/>
- <xs:element name="width" type="xs:string"
minOccurs="0" maxOccurs="1"/>
- <xs:element name="height" type="xs:string"
minOccurs="0" maxOccurs="1"/>
+ <xs:group ref="applicationGroup"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="gadgetApplicationType">
<xs:sequence>
<xs:element name="gadget" type="gadgetType"
minOccurs="1" maxOccurs="1"/>
+ <xs:group ref="applicationGroup"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:group name="applicationGroup">
+ <xs:sequence>
<xs:element name="theme" type="xs:string"
minOccurs="0" maxOccurs="1"/>
<xs:element name="title" type="xs:string"
minOccurs="0" maxOccurs="1"/>
<xs:element name="access-permissions" type="xs:string"
minOccurs="1" maxOccurs="1"/>
@@ -207,7 +204,7 @@
<xs:element name="width" type="xs:string"
minOccurs="0" maxOccurs="1"/>
<xs:element name="height" type="xs:string"
minOccurs="0" maxOccurs="1"/>
</xs:sequence>
- </xs:complexType>
+ </xs:group>
<xs:complexType name="portletType">
<xs:sequence>
@@ -236,4 +233,4 @@
<xs:element name="read-only" type="xs:string"
minOccurs="0" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
-</xs:schema>
\ No newline at end of file
+</xs:schema>
Modified:
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/TestXSDCorruption.java
===================================================================
---
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/TestXSDCorruption.java 2011-08-14
20:46:07 UTC (rev 7119)
+++
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/TestXSDCorruption.java 2011-08-14
20:57:51 UTC (rev 7120)
@@ -60,6 +60,6 @@
{
assertHash("d0591b0a022a0c2929e1aed8979857cd",
"gatein_objects_1_0.xsd");
assertHash("99ae24c9bbfe1b59e066756a29ab6c79",
"gatein_objects_1_1.xsd");
- assertHash("852e20df61c51199e3425f0882f2581d",
"gatein_objects_1_2.xsd");
+ assertHash("b0e79a35641cccf49c8796a99a5a91a3",
"gatein_objects_1_2.xsd");
}
}