Hi Craig,

Hi Michael,

I applied the patch (I think correctly) and got these errors.

Let me know if you disagree with my comments.

did you update your workspace? Yesterday I checked in a new version of jdo.xsd (revision 378770) fixing the errors you mention below. Today I could run the XMLTest w/o errors on a fresh checked out api20 project with the patch applied.

Regards Michael


Craig


Testsuite: javax.jdo.schema.XMLTest
Tests run: 3, Failures: 1, Errors: 1, Time elapsed: 3.554 sec

Testcase: testXSDBased(javax.jdo.schema.XMLTest):    FAILED
------------------------
Handler.error: Positive99-xsd.jdo [line=93, col=32]: cvc-complex- type.3.2.2: Attribute 'persistence-modifier' is not allowed to appear in element 'property'.
        fetch-group="fetchgroup"
        recursion-depth="fetchdepth"
        field-name="fieldname">
                               ^


The line and col match the input file but don't identify the location of the error.

The persistence-modifier attribute is missing from the xsd file. It's in the latest spec.

        <extension vendor-name="SUNW" key="KEY" value="VALUE"/>
        <extension vendor-name="SUNW" key="KEY" value="VALUE"/>
------------------------
Handler.error: Positive99-xsd.jdo [line=100, col=37]: cvc-complex- type.3.2.2: Attribute 'element-type' is not allowed to appear in element 'array'.
          embedded-element="true"
          dependent-element="true"
          serialized-element="true">
                                    ^


The element-type is missing from the xsd.

          <extension vendor-name="SUNW" key="KEY" value="VALUE"/>
          <extension vendor-name="SUNW" key="KEY" value="VALUE"/>
------------------------
Handler.error: Positive99-xsd.jdo [line=196, col=36]: cvc-complex- type.2.4.a: Invalid content starting with element 'property'. One of '{"":field, "":extension}' is expected.
          <field name="name13"/>
          <field name="name14"/>
          <property name="name15"/>
                                   ^


Element property is missing from element field in the xsd.

          <property name="name16"/>
          <extension vendor-name="SUNW" key="KEY" value="VALUE"/>
------------------------
Handler.error: Positive99-xsd.jdo [line=258, col=32]: cvc-complex- type.3.2.2: Attribute 'mapped-by' is not allowed to appear in element 'order'.
          column="COLUMN"
          indexed="true"
          mapped-by="anything">
                               ^


Attribute mapped-by is missing from the element order in the xsd.

          <extension vendor-name="SUNW" key="KEY" value="VALUE"/>
          <extension vendor-name="SUNW" key="KEY" value="VALUE"/>
------------------------
Handler.error: Positive99-xsd.jdo [line=286, col=24]: cvc-complex- type.3.2.2: Attribute 'persistence-modifier' is not allowed to appear in element 'property'.
        delete-action="cascade"
        indexed="false"
        unique="false">
                       ^
        <collection
          element-type="CollectionElementType"
------------------------
Handler.error: Positive99-xsd.jdo [line=301, col=26]: cvc-complex- type.3.2.2: Attribute 'persistence-modifier' is not allowed to appear in element 'property'.
        null-value="none"
        delete-action="null"
        indexed="unique">
                         ^
        <map
          key-type="mapkeytype"
------------------------
Handler.error: Positive99-xsd.jdo [line=336, col=64]: cvc-complex- type.2.4.a: Invalid content starting with element 'extension'. One of '{"":fetch-group, "":field}' is expected.
        name="FetchGroup"
        post-load="true">
        <extension vendor-name="SUNW" key="KEY" value="VALUE"/>
                                                               ^
        <extension vendor-name="SUNW" key="KEY" value="VALUE"/>
        <property name="name17"/>
------------------------
Handler.error: Positive99-xsd.jdo [line=394, col=16]: cvc-complex- type.2.4.a: Invalid content starting with element 'column'. One of '{"":unique, "":field, "":query, "":fetch-group, "":extension}' is expected.
      <unique/>
      <unique/>
      <column/>
               ^


Element column is missing from element class in the xsd.

      <column/>
      <field

junit.framework.AssertionFailedError: ------------------------
Handler.error: Positive99-xsd.jdo [line=93, col=32]: cvc-complex- type.3.2.2: Attribute 'persistence-modifier' is not allowed to appear in element 'property'.
        fetch-group="fetchgroup"
        recursion-depth="fetchdepth"
        field-name="fieldname">
                               ^
        <extension vendor-name="SUNW" key="KEY" value="VALUE"/>
        <extension vendor-name="SUNW" key="KEY" value="VALUE"/>
------------------------
Handler.error: Positive99-xsd.jdo [line=100, col=37]: cvc-complex- type.3.2.2: Attribute 'element-type' is not allowed to appear in element 'array'.
          embedded-element="true"
          dependent-element="true"
          serialized-element="true">
                                    ^
          <extension vendor-name="SUNW" key="KEY" value="VALUE"/>
          <extension vendor-name="SUNW" key="KEY" value="VALUE"/>
------------------------
Handler.error: Positive99-xsd.jdo [line=196, col=36]: cvc-complex- type.2.4.a: Invalid content starting with element 'property'. One of '{"":field, "":extension}' is expected.
          <field name="name13"/>
          <field name="name14"/>
          <property name="name15"/>
                                   ^

Element property is missing from element embedded in the xsd.

          <property name="name16"/>
          <extension vendor-name="SUNW" key="KEY" value="VALUE"/>
------------------------
Handler.error: Positive99-xsd.jdo [line=258, col=32]: cvc-complex- type.3.2.2: Attribute 'mapped-by' is not allowed to appear in element 'order'.
          column="COLUMN"
          indexed="true"
          mapped-by="anything">
                               ^
          <extension vendor-name="SUNW" key="KEY" value="VALUE"/>
          <extension vendor-name="SUNW" key="KEY" value="VALUE"/>
------------------------
Handler.error: Positive99-xsd.jdo [line=286, col=24]: cvc-complex- type.3.2.2: Attribute 'persistence-modifier' is not allowed to appear in element 'property'.
        delete-action="cascade"
        indexed="false"
        unique="false">
                       ^
        <collection
          element-type="CollectionElementType"
------------------------
Handler.error: Positive99-xsd.jdo [line=301, col=26]: cvc-complex- type.3.2.2: Attribute 'persistence-modifier' is not allowed to appear in element 'property'.
        null-value="none"
        delete-action="null"
        indexed="unique">
                         ^
        <map
          key-type="mapkeytype"
------------------------
Handler.error: Positive99-xsd.jdo [line=336, col=64]: cvc-complex- type.2.4.a: Invalid content starting with element 'extension'. One of '{"":fetch-group, "":field}' is expected.
        name="FetchGroup"
        post-load="true">
        <extension vendor-name="SUNW" key="KEY" value="VALUE"/>
                                                               ^

Element extension is missing from element fetch-group in the xsd.

        <extension vendor-name="SUNW" key="KEY" value="VALUE"/>
        <property name="name17"/>
------------------------
Handler.error: Positive99-xsd.jdo [line=394, col=16]: cvc-complex- type.2.4.a: Invalid content starting with element 'column'. One of '{"":unique, "":field, "":query, "":fetch-group, "":extension}' is expected.
      <unique/>
      <unique/>
      <column/>
               ^
      <column/>
      <field


On Feb 18, 2006, at 1:02 PM, Michael Bouschen (JIRA) wrote:

     [ http://issues.apache.org/jira/browse/JDO-202?page=all ]

Michael Bouschen updated JDO-202:
---------------------------------

    Attachment: schemaValidation-060218.patch

There is a new patch schemaValidation-060218.patch includes the new test class XMLTest, 6 positive and 2 negative test .jdo files. We still need to add test .orm and .jdoquery files.

orm.xsd and unit tests for xsd are missing
------------------------------------------

         Key: JDO-202
         URL: http://issues.apache.org/jira/browse/JDO-202
     Project: JDO
        Type: Test
  Components: api20
    Versions: JDO 2 beta
    Reporter: Michelle Caisse
    Assignee: Michael Bouschen
     Fix For: JDO 2 rc1
Attachments: XSD.patch, schemaValidation-060212.patch, schemaValidation-060218.patch, schematest.patch

The xsd is missing from api20/src/dtd/javax/jdo and there is no test for it. Also need a test for jdo.xsd.


--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the  administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:[EMAIL PROTECTED]
P.S. A good JDO? O, Gasp!



--
Michael Bouschen                [EMAIL PROTECTED] Engineering GmbH
mailto:[EMAIL PROTECTED]        http://www.tech.spree.de/
Tel.:++49/30/235 520-33         Buelowstr. 66                   
Fax.:++49/30/2175 2012          D-10783 Berlin                  

Reply via email to