- From: Michael Kay <mike@saxonica.com>
- Date: Tue, 13 Mar 2007 09:02:58 -0000
- To: "'Swayam Vemuri -X \(swvemuri - WIPRO at Cisco\)'" <swvemuri@cisco.com>, <xmlschema-dev@w3.org>
- Message-ID: <007b01c7654e$67343e40$6401a8c0@turtle>
I think that your problems are very specific to the XML editing tools you are using and you would be much better off asking your questions on a forum associated with those tools. There's nothing wrong with your schema as such. Michael Kay http://www.saxonica.com/ _____ From: xmlschema-dev-request@w3.org [mailto:xmlschema-dev-request@w3.org] On Behalf Of Swayam Vemuri -X (swvemuri - WIPRO at Cisco) Sent: 13 March 2007 08:25 To: xmlschema-dev@w3.org Subject: No placeholders for any and anyAttribute in XML though schema has them Hi All, Iam observing a strange behaviour. Pl let me know how to solve this problem. I have three schemas(xsd) Java.xsd, database.xsd, base.xsd. Iam importing java.xsd and database.xsd into base.xsd. Snippets of all these schemas are given at the end of this email. For instantiating my schema Iam doing below (a) Iam generating ecore and genmodel using base.xsd as input. (b) Then Iam generating EMF edit and editor plugins. (c) Launching a new instance of Eclipse and there Iam instantiating my schema. The problem I am observing is as described below Note that in base.xsd I have a sequence under referenceType. This sequence has <xs:any namespace="##other" processContents="strict" minOccurs="0"/> So while instantiating an XML based on base.xsd, when I right click on referenceType, I did get an option by name "set"(see database.xsd). But the problem is the attribute in java.xsd that is "javaAccess" and attribute in database.xsd that is "cascade" are not shown under referenceType though in base.xsd , referenceType has below <xs:anyAttribute namespace="##other" processContents="strict" /> The eclipse and related plugins installation details are as given below ================================================== I have eclipse 3.2.1(Callisto) with EMF plugins with ver 2.2.1 Iam using EMF plugins of eclipse using which Iam instantiating the schema and here Iam seeing that Strange behaviour. I have installed XML Spy Enterprise Edition version 2007 sp2 and corresponding Eclipse plugin. am using XML Spy only for editing schemas. Thanks, Swayam Java.xsd ------------ <?xml version="1.0" encoding="UTF-8"?> <java:schema xmlns="http://www.cisco.com/abc/def/java" xmlns:java="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.cisco.com/abc/def/java" elementFormDefault="qualified" attributeFormDefault="unqualified"> <java:simpleType name="JavaAccessType"> .. </java:simpleType> <java:simpleType name="JavaDataType"> <java:restriction base="java:string"> <java:enumeration value="boolean"/> <java:enumeration value="Boolean"/> <java:enumeration value="double"/> <java:enumeration value="Double"/> .......... </java:restriction> </java:simpleType> <java:simpleType name="Package"> <java:restriction base="java:string"/> </java:simpleType> <java:attribute name="javaAccess" type="JavaAccessType"/> <java:attribute name="javaDataType" type="JavaDataType"/> <java:attribute name="package" type="Package"/> </java:schema> Database.xsd ------------- <?xml version="1.0" encoding="UTF-8"?> <database:schema xmlns="http://www.cisco.com/abc/def/database" xmlns:database="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.cisco.com/abc/def/database" elementFormDefault="qualified" attributeFormDefault="unqualified"> <database:simpleType name="DBInheritanceHierarchyType"> ..... </database:simpleType> <database:complexType name="CollectionType" abstract="true" > <database:complexContent> <database:restriction base="database:anyType"> <database:attribute name="KeyColumn" type="database:string" use="required"/> <database:attribute name="OneToManyClassName" type="database:string" use="required"/> </database:restriction> </database:complexContent> </database:complexType> <database:complexType name="SetType"> <database:complexContent> <database:extension base="CollectionType"/> </database:complexContent> </database:complexType> <database:simpleType name="CascadeType"> <database:restriction base="database:string"> <database:enumeration value="all"/> <database:enumeration value="none"/> <database:enumeration value="save-update"/> <database:enumeration value="delete"/> <database:enumeration value="all-delete-orphan"/> <database:enumeration value="delete-orphan"/> </database:restriction> </database:simpleType> <database:attribute name="dBInheritanceHierarchy" type="DBInheritanceHierarchyType"/> <database:element name="set" type="SetType"/> <database:attribute name="cascade" type="CascadeType"/> </database:schema> Base.xsd --------- <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns="http://www.cisco.com/abc/def" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:java="http://www.cisco.com/abc/def/java" xmlns:database="http://www.cisco.com/abc/def/database" targetNamespace="http://www.cisco.com/abc/def" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:import namespace="http://www.cisco.com/abc/def/java" schemaLocation="java.xsd"/> <xs:import namespace="http://www.cisco.com/abc/def/database" schemaLocation="database.xsd"/> <xs:complexType name="referenceType"> <xs:sequence> <xs:any namespace="##other" processContents="strict" minOccurs="0"/> <xs:element name="description" type="xs:string" minOccurs="0"/> <xs:element ref="assert" minOccurs="0" maxOccurs="unbounded"/> <!--xs:element name="Set" minOccurs="1" type="database:Set" /--> </xs:sequence> < !--xs:attribute name="JavaAccessType" type="java:JavaAccessType"/> <xs:attribute name="Cascade" type="database:Cascade"/--> <xs:attribute name="name" type="xs:string" use="required"/> <xs:attribute name="targetIsA" type="xs:string" use="optional"/> <xs:anyAttribute namespace="##other" processContents="strict" /> </xs:complexType> ......... ......... </xs:schema>
Received on Tuesday, 13 March 2007 09:03:33 UTC