Author: tfischer
Date: Mon Sep 6 20:29:20 2010
New Revision: 993144
URL: http://svn.apache.org/viewvc?rev=993144&view=rev
Log:
Added test for schema validation
Added:
db/torque/torque4/trunk/torque-generator/src/test/resources/org/apache/torque/generator/source/xml/schema.xsd
db/torque/torque4/trunk/torque-generator/src/test/resources/org/apache/torque/generator/source/xml/sourceConformingWithSchema.xml
db/torque/torque4/trunk/torque-generator/src/test/resources/org/apache/torque/generator/source/xml/sourceNotConformingWithSchema.xml
Added:
db/torque/torque4/trunk/torque-generator/src/test/resources/org/apache/torque/generator/source/xml/schema.xsd
URL:
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/resources/org/apache/torque/generator/source/xml/schema.xsd?rev=993144&view=auto
==============================================================================
---
db/torque/torque4/trunk/torque-generator/src/test/resources/org/apache/torque/generator/source/xml/schema.xsd
(added)
+++
db/torque/torque4/trunk/torque-generator/src/test/resources/org/apache/torque/generator/source/xml/schema.xsd
Mon Sep 6 20:29:20 2010
@@ -0,0 +1,52 @@
+<?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.
+-->
+<!--
+ Torque XML database schema DTD
+ $Id$
+-->
+
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://db.apache.org/torque/4.0/generator/test/namespace"
+ xmlns="http://db.apache.org/torque/4.0/generator/test/namespace"
+ version="4.0">
+
+ <xs:element name="root" type="rootType">
+ </xs:element>
+
+ <xs:complexType name="rootType">
+ <xs:attribute name="attribute" type="attributeType" use="required">
+ <xs:annotation>
+ <xs:documentation xml:lang="en" >
+The name used to identify this schema in the generated
+Java objects and as the default JDBC connection pool to use.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:complexType>
+
+ <xs:simpleType name="attributeType">
+ <xs:restriction base="xs:NMTOKEN">
+ <xs:enumeration value="value" />
+ <xs:enumeration value="otherValue" />
+ </xs:restriction>
+ </xs:simpleType>
+
+</xs:schema>
\ No newline at end of file
Added:
db/torque/torque4/trunk/torque-generator/src/test/resources/org/apache/torque/generator/source/xml/sourceConformingWithSchema.xml
URL:
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/resources/org/apache/torque/generator/source/xml/sourceConformingWithSchema.xml?rev=993144&view=auto
==============================================================================
---
db/torque/torque4/trunk/torque-generator/src/test/resources/org/apache/torque/generator/source/xml/sourceConformingWithSchema.xml
(added)
+++
db/torque/torque4/trunk/torque-generator/src/test/resources/org/apache/torque/generator/source/xml/sourceConformingWithSchema.xml
Mon Sep 6 20:29:20 2010
@@ -0,0 +1,26 @@
+<?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.
+-->
+
+<root
+ xmlns="http://db.apache.org/torque/4.0/generator/test/namespace"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://db.apache.org/torque/4.0/generator/test/namespace
+ http://db.apache.org/torque/4.0/generator/test/namespace.xsd"
+ attribute="value"/>
Added:
db/torque/torque4/trunk/torque-generator/src/test/resources/org/apache/torque/generator/source/xml/sourceNotConformingWithSchema.xml
URL:
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/resources/org/apache/torque/generator/source/xml/sourceNotConformingWithSchema.xml?rev=993144&view=auto
==============================================================================
---
db/torque/torque4/trunk/torque-generator/src/test/resources/org/apache/torque/generator/source/xml/sourceNotConformingWithSchema.xml
(added)
+++
db/torque/torque4/trunk/torque-generator/src/test/resources/org/apache/torque/generator/source/xml/sourceNotConformingWithSchema.xml
Mon Sep 6 20:29:20 2010
@@ -0,0 +1,26 @@
+<?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.
+-->
+
+<root
+ xmlns="http://db.apache.org/torque/4.0/generator/test/namespace"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://db.apache.org/torque/4.0/generator/test/namespace
+ http://db.apache.org/torque/4.0/generator/test/namespace.xsd"
+ attribute="value7"/>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]