You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ws.apache.org by aj...@apache.org on 2005/11/28 10:29:15 UTC
svn commit: r349404 - in /webservices/commons/trunk/XmlSchema:
src/org/apache/ws/commons/schema/XmlSchemaCollection.java
test-resources/allSimpleTypes.xsd
Author: ajith
Date: Mon Nov 28 01:28:27 2005
New Revision: 349404
URL: http://svn.apache.org/viewcvs?rev=349404&view=rev
Log:
1. Updated the simple types. Now it seems that all the necessary simple types (including the derived ones) are added
2. Updated the test schema
Modified:
webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaCollection.java
webservices/commons/trunk/XmlSchema/test-resources/allSimpleTypes.xsd
Modified: webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaCollection.java
URL: http://svn.apache.org/viewcvs/webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaCollection.java?rev=349404&r1=349403&r2=349404&view=diff
==============================================================================
--- webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaCollection.java (original)
+++ webservices/commons/trunk/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaCollection.java Mon Nov 28 01:28:27 2005
@@ -73,11 +73,33 @@
/**
* This section should comply to the XMLSchema specification
* @see http://www.w3.org/TR/2004/PER-xmlschema-2-20040318/datatypes.html#built-in-datatypes
- * todo - Some types may be missing.Need a thorough comparison with the mentioned document
- * to fix it.
+ *
+ * This needs to be inspected by another pair of eyes
*/
public void init() {
- //Primitive types
+ /*
+ Primitive types
+
+ 3.2.1 string
+ 3.2.2 boolean
+ 3.2.3 decimal
+ 3.2.4 float
+ 3.2.5 double
+ 3.2.6 duration
+ 3.2.7 dateTime
+ 3.2.8 time
+ 3.2.9 date
+ 3.2.10 gYearMonth
+ 3.2.11 gYear
+ 3.2.12 gMonthDay
+ 3.2.13 gDay
+ 3.2.14 gMonth
+ 3.2.15 hexBinary
+ 3.2.16 base64Binary
+ 3.2.17 anyURI
+ 3.2.18 QName
+ 3.2.19 NOTATION
+ */
addSimpleType(xsd, Constants.XSD_STRING.getLocalPart());
addSimpleType(xsd, Constants.XSD_BOOLEAN.getLocalPart());
addSimpleType(xsd, Constants.XSD_FLOAT.getLocalPart());
@@ -86,6 +108,7 @@
addSimpleType(xsd, Constants.XSD_DECIMAL.getLocalPart());
addSimpleType(xsd, Constants.XSD_DURATION.getLocalPart());
addSimpleType(xsd, Constants.XSD_DATE.getLocalPart());
+ addSimpleType(xsd, Constants.XSD_TIME.getLocalPart());
addSimpleType(xsd, Constants.XSD_DATETIME.getLocalPart());
addSimpleType(xsd, Constants.XSD_DAY.getLocalPart());
addSimpleType(xsd, Constants.XSD_MONTH.getLocalPart());
@@ -97,7 +120,36 @@
addSimpleType(xsd, Constants.XSD_BASE64.getLocalPart());
addSimpleType(xsd, Constants.XSD_ANYURI.getLocalPart());
- //derived types from decimal
+
+ /*
+ 3.3.1 normalizedString
+ 3.3.2 token
+ 3.3.3 language
+ 3.3.4 NMTOKEN
+ 3.3.5 NMTOKENS
+ 3.3.6 Name
+ 3.3.7 NCName
+ 3.3.8 ID
+ 3.3.9 IDREF
+ 3.3.10 IDREFS
+ 3.3.11 ENTITY
+ 3.3.12 ENTITIES
+ 3.3.13 integer
+ 3.3.14 nonPositiveInteger
+ 3.3.15 negativeInteger
+ 3.3.16 long
+ 3.3.17 int
+ 3.3.18 short
+ 3.3.19 byte
+ 3.3.20 nonNegativeInteger
+ 3.3.21 unsignedLong
+ 3.3.22 unsignedInt
+ 3.3.23 unsignedShort
+ 3.3.24 unsignedByte
+ 3.3.25 positiveInteger
+ */
+
+ //derived types from decimal
addSimpleType(xsd, Constants.XSD_LONG.getLocalPart());
addSimpleType(xsd, Constants.XSD_SHORT.getLocalPart());
addSimpleType(xsd, Constants.XSD_BYTE.getLocalPart());
@@ -114,6 +166,7 @@
//derived types from string
addSimpleType(xsd, Constants.XSD_NAME.getLocalPart());
+ addSimpleType(xsd, Constants.XSD_NORMALIZEDSTRING.getLocalPart());
addSimpleType(xsd, Constants.XSD_NCNAME.getLocalPart());
addSimpleType(xsd, Constants.XSD_NMTOKEN.getLocalPart());
addSimpleType(xsd, Constants.XSD_NMTOKENS.getLocalPart());
Modified: webservices/commons/trunk/XmlSchema/test-resources/allSimpleTypes.xsd
URL: http://svn.apache.org/viewcvs/webservices/commons/trunk/XmlSchema/test-resources/allSimpleTypes.xsd?rev=349404&r1=349403&r2=349404&view=diff
==============================================================================
--- webservices/commons/trunk/XmlSchema/test-resources/allSimpleTypes.xsd (original)
+++ webservices/commons/trunk/XmlSchema/test-resources/allSimpleTypes.xsd Mon Nov 28 01:28:27 2005
@@ -40,6 +40,7 @@
<xs:element name="PrimitiveNotation" type="xs:NOTATION"/>
<xs:element name="PrimitiveAnyURI" type="xs:anyURI"/>
<xs:element name="PrimitiveYearMonth" type="xs:gYearMonth"/>
+ <xs:element name="PrimitiveTime" type="xs:time"/>
<!--3.3.1 normalizedString
3.3.2 token
3.3.3 language
@@ -68,10 +69,28 @@
-->
<xs:element name="DerivedPositiveInteger" type="xs:positiveInteger"/>
+ <xs:element name="DerivedNegativeInteger" type="xs:negativeInteger"/>
+ <xs:element name="DerivedNonNegativeInteger" type="xs:nonNegativeInteger"/>
+ <xs:element name="DerivedNonpositiveInteger" type="xs:nonPositiveInteger"/>
+ <xs:element name="DerivedUnsignedShort" type="xs:unsignedShort"/>
+ <xs:element name="DerivedUnsignedLong" type="xs:unsignedLong"/>
+ <xs:element name="DerivedUnsignedInt" type="xs:unsignedInt"/>
+ <xs:element name="DerivedUnsignedByte" type="xs:unsignedByte"/>
+ <xs:element name="DerivedLong" type="xs:long"/>
+ <xs:element name="DerivedShort" type="xs:short"/>
+ <xs:element name="DerivedInt" type="xs:int"/>
<xs:element name="DerivedByte" type="xs:byte"/>
<xs:element name="DerivedToken" type="xs:token"/>
<xs:element name="DerivedLanguage" type="xs:language"/>
<xs:element name="DerivedNMTOKEN" type="xs:NMTOKEN"/>
<xs:element name="DerivedNMTOKENS" type="xs:NMTOKENS"/>
- <!-- todo Add the other types here -->
+ <xs:element name="DerivedID" type="xs:ID"/>
+ <xs:element name="DerivedIDRef" type="xs:IDREF"/>
+ <xs:element name="DerivedEntity" type="xs:ENTITY"/>
+ <xs:element name="DerivedEntities" type="xs:ENTITIES"/>
+ <xs:element name="DerivedName" type="xs:Name"/>
+ <xs:element name="DerivedNameToken" type="xs:NMTOKEN"/>
+ <xs:element name="DerivedNCName" type="xs:NCName"/>
+ <xs:element name="DerivedNormalizedString" type="xs:normalizedString"/>
+ <xs:element name="DerivedInteger" type="xs:integer"/>
</xs:schema>