PS. Can select XMLSchema doc but no root element appears

Having trouble installing <oXygen/>? Got a bug to report? Post it all here.
peahayes
Posts: 3

PS. Can select XMLSchema doc but no root element appears

Thu Mar 20, 2003 12:05 am

I am on Mac OS X 10.2.4 and do have Java 1.4.1 installed. I tried applying the property list fix suggested in one of the recent messages, but what I did caused <oXygen> to not open. Before the plist patch, <oXygen/> has worked quite nicely.

Or is that the issue with CodeInsight not working, that not knowing the root element isi the problem?

Also, I haven't been able to figure out how to write some XML without a DTD or Schema, and then have <oXygen/> generate a Schema instead of a DTD. Is this part of the same problem, or is it different, or am I cracked?

Thanks,

Pam
Pam Hayes
University of Michigan, Ann Arbor
george
Site Admin
Posts: 2100

Thu Mar 20, 2003 12:44 pm

Dear Pam,

Please provide a sample schema and the steps you followed so we can reproduce the problem.

There is no support currently to generate schema from an instance document or from a DTD. We plan to add support for these in future versions.

All the best,
George
peahayes
Posts: 3

Sample Schema files - from xerces example from <oXygen/&g

Thu Mar 20, 2003 5:32 pm

I'll post the .xsd file that came with <oXygen/> as an example. The fact that the problem occurred with the sample file concerned me. To be clear, this is the file that I specified when I created a new XML document. No document root showed up in the popup menu.

The steps I followed were:

1) Selected "New" from the File menu

2) Chose "XML" as the type of file to create

3) Selected the person.xsd file (/Applications/oxygen/1.2.4/samples/person.xsd)

4) Looked at the "document root" popup menu, and observed that there were no items listed.

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<project>
   <projectTree name="personal.xsd">
      <xs:notation name="gif" public="-//APP/Photoshop/4.0" system="photoshop.exe"/>
      <xs:element name="link">
         <xs:complexType>
            <xs:attribute name="manager" type="xs:IDREF"/>
            <xs:attribute name="subordinates" type="xs:IDREFS"/>
         </xs:complexType>
      </xs:element>
      <xs:element name="url">
         <xs:complexType>
            <xs:attribute default="http://" name="href" type="xs:string"/>
         </xs:complexType>
      </xs:element>
      <xs:element name="email" type="xs:string"/>
      <xs:element name="given" type="xs:string"/>
      <xs:element name="family" type="xs:string"/>
      <xs:element name="name">
         <xs:complexType>
            <xs:all>
               <xs:element ref="family"/>
               <xs:element ref="given"/>
            </xs:all>
         </xs:complexType>
      </xs:element>
      <xs:element name="person">
         <xs:complexType>
            <xs:sequence>
               <xs:element ref="name"/>
               <xs:element maxOccurs="unbounded" minOccurs="0" ref="email"/>
               <xs:element maxOccurs="unbounded" minOccurs="0" ref="url"/>
               <xs:element maxOccurs="1" minOccurs="0" ref="link"/>
            </xs:sequence>
            <xs:attribute name="id" type="xs:ID" use="required"/>
            <xs:attribute name="note" type="xs:string"/>
            <xs:attribute default="false" name="contr">
               <xs:simpleType>
                  <xs:restriction base="xs:string">
                     <xs:enumeration value="true"/>
                     <xs:enumeration value="false"/>
                  </xs:restriction>
               </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="salary" type="xs:integer"/>
         </xs:complexType>
      </xs:element>
      <xs:element name="personnel">
         <xs:complexType>
            <xs:sequence>
               <xs:element maxOccurs="unbounded" minOccurs="1" ref="person"/>
            </xs:sequence>
         </xs:complexType>
         <xs:unique name="unique1">
            <xs:selector xpath="person"/>
            <xs:field xpath="name/given"/>
            <xs:field xpath="name/family"/>
         </xs:unique>
         <xs:key name="empid">
            <xs:selector xpath="person"/>
            <xs:field xpath="@id"/>
         </xs:key>
         <xs:keyref name="keyref1" refer="empid">
            <xs:selector xpath="person"/>
            <xs:field xpath="link/@manager"/>
         </xs:keyref>
      </xs:element>
   </projectTree>
</project>
Pam Hayes

University of Michigan, Ann Arbor
george
Site Admin
Posts: 2100

Thu Mar 20, 2003 6:01 pm

Hi Pam,

Thanks for posting the schema content, this clarifies the problem. It seems you loaded the personal.xsd as a project and it got saved after this, thus altering the file. It is not a valid XMLSchema anymore. Please get the original file back and it should work without problems (I will send you an email with the original file). Also open only xpr (oXygen project files) as projects.

BTW, we will have in oXygen 2.0 release support for converting from DTD to XML Schema.

Best Regards,
George

Return to “Common Problems”

Who is online

Users browsing this forum: No registered users and 1 guest