Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Attributes from a different namespace

From: "Swayam Vemuri -X \(swvemuri - WIPRO at Cisco\)" <swvemuri@-----.--->
To: <xmlschema-dev@--.--->
Date: 3/6/2007 7:38:00 PM
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