Maybe I don't understand some code here. When constructing the QName for elements and attributes, it seems it is set to emptyNamespaceURI if getElemAttrDefaultQualified() is not set. Now given a SchemaElementDecl or SchemaAttDef how can I figure out which namespace does this come from. Can anyone explain please.
Thanks Kiran -----Original Message----- From: Bagepalli, Kiran [mailto:[EMAIL PROTECTED]] Sent: Monday, November 25, 2002 5:41 PM To: '[EMAIL PROTECTED]' Subject: Problem with SchemaAttDef I am trying to figure out the URI given the URIId. If I use SEnumVal for attribute "Unit", I get a QName with uridid = 1 And when I call getURIText(uriId), it returns me a empty string saying it does not belong to any namespace. Actually this should return 6 which is the uriid for www.books.org. Can someone explain what is happening. Thanks Kiran <?xml version="1.0"?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.books.org" xmlns="http://www.books.org" elementFormDefault="qualified"> <xsd:complexType name="PublicationType" abstract="true"> <xsd:sequence> <xsd:element name="Title" type="xsd:string"/> <xsd:element name="Author" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/> <xsd:element name="Date" type="xsd:gYear"/> </xsd:sequence> <xsd:attribute name="Unit" type="xsd:string"/> </xsd:complexType> <xsd:complexType name="BookType"> <xsd:complexContent> <xsd:extension base="PublicationType" > <xsd:sequence> <xsd:element name="ISBN" type="xsd:string"/> <xsd:element name="Publisher" type="xsd:string"/> </xsd:sequence> </xsd:extension> </xsd:complexContent> </xsd:complexType> <xsd:complexType name="MagazineType"> <xsd:complexContent> <xsd:restriction base="PublicationType"> <xsd:sequence> <xsd:element name="Title" type="xsd:string"/> <xsd:element name="Author" type="xsd:string" minOccurs="0" maxOccurs="0"/> <xsd:element name="Date" type="xsd:gYear"/> </xsd:sequence> </xsd:restriction> </xsd:complexContent> </xsd:complexType> <xsd:element name="Publication" type="PublicationType"/> <xsd:element name="BookStore"> <xsd:complexType> <xsd:sequence> <xsd:element ref="Publication" maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
