Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: Attributes from a different namespace

From: "Michael Kay" <mike@--------.--->
To: "'Swayam Vemuri -X \(swvemuri - WIPRO at Cisco\)'" <swvemuri@-----.--->, <xmlschema-dev@--.--->
Date: 3/6/2007 9:29:00 PM
You can't write type="java:IsBridge" because java:IsBridge is an attribute,
not a type.
 
I'm not sure what you wanted it to mean.
 
Michael Kay
http://www.saxonica.com/


  _____  

From: xmlschema-dev-request@w... [mailto:xmlschema-dev-request@w...] On
Behalf Of Swayam Vemuri -X (swvemuri - WIPRO at Cisco)
Sent: 06 March 2007 08:50
To: xmlschema-dev@w...
Subject: Attributes from a different namespace



Hi All,

 

Iam newbie regarding xml and xsd. I am facing below issue, Can anyone please
tell me a way out.

 

I have below schema - java1.xsd

 


<?xml version="1.0" encoding="UTF-8"?>

<!-- edited with XMLSpy v2005 rel. 3 U (http://www.altova.com) by Prakash
Bettadapur (private) -->

<java:schema xmlns="http://www.cisco.com/efg/abc/java" 

xmlns:java="http://www.w3.org/2001/XMLSchema" 

attributeFormDefault="unqualified" elementFormDefault="qualified" 

targetNamespace="http://www.cisco.com/efg/abc/java">

      <java:simpleType name="javaTypeOfReference">

            <java:restriction base="java:string">

                  <java:enumeration value="Set"/>

                  <java:enumeration value="Bag"/>

                  <java:enumeration value="List"/>

            </java:restriction>

      </java:simpleType>

      <java:attribute name="IsBridge" type="java:boolean"/>

</java:schema>

 

 

I have imported above xsd into below schema - base1.xsd, a snippet of which
is as shown below

 


<?xml version="1.0" encoding="UTF-8"?>

<!-- edited with XMLSpy v2005 rel. 3 U (http://www.altova.com) by Prakash
Bettadapur (private) -->

<xs:schema 

xmlns="http://www.cisco.com/efg/abc" 

xmlns:xs="http://www.w3.org/2001/XMLSchema"
attributeFormDefault="unqualified" elementFormDefault="qualified"

xmlns:java="http://www.cisco.com/efg/abc/java"

targetNamespace="http://www.cisco.com/efg/abc">

<xs:import namespace="http://www.cisco.com/efg/abc/java"
schemaLocation="java1.xsd"/>

 

....................... 

<xs:complexType name="attributeType">

            <xs:sequence>

                  <xs:any minOccurs="0" namespace="##other"
processContents="lax"/>

                  <xs:element minOccurs="0" name="description"
type="xs:string"/>

                  <xs:element maxOccurs="unbounded" minOccurs="0"
ref="assert"/>

            </xs:sequence>

            <xs:attribute name="name" type="xs:string" use="required"/>

            <xs:attribute name="type" type="xs:string" use="required"/>


            <xs:attributeGroup ref="statusAttrGroup"/>            

            <xs:attribute name="IsHidden" type="java:IsBridge"/> ----->
Error

            <xs:anyAttribute namespace="##other" processContents="lax"/>

      </xs:complexType>

.......

</xs:schema>

 

Iam getting error in base1.xsd saying

Problems were detected while validating and converting the XML Schemas

  Error: XSD: Attribute reference
'http://www.cisco.com/efg/abc/java#IsBridge' is unresolved : URI
file:/D:/swayam/Polyphony/EFG_schema/abc_21.xsd Line 88 Column 3

 

Thanks

Swayam



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent