W3C home > Mailing lists > Public > xmlschema-dev@w3.org > May 2004

Re: Namespaces in Attribute Value..

From: Xan Gregg <xan.gregg@jmp.com>
Date: Wed, 12 May 2004 14:40:24 -0400
Message-Id: <D48E6578-A443-11D8-8AEC-000393BB384C@jmp.com>
Cc: xmlschema-dev@w3.org
To: Ashok <ashoksrini@yahoo.com>

If you want to ensure that the value of the attribute is in fact a type 
name in the schema, then xs:QName doesn't give you that.  Nothing does 
that with XML Schema validation.

xan

On May 11, 2004, at 3:57 PM, Ashok wrote:
> Hi..
>
> I want to know how to validate instance documents that
> has an attribute, and the value of the attribute is of
> form "prefix:value".
>
> To explain more clearly...
>
> I have an instance document:
>
> <Documents
>    xmlns:dd="http://test.uri.org"
>
> xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance"
>    xsi:schemaLocation="http://test.uri.org
>                        c:/document.xsd">
>
>    <document doctype="dd:PurchaseOrder"/>
>
> </Documents>
>
> How can I validate this document, such that the schema
> validator checks that value of doctype attribute,
> "PurchaseOrder" exists in namespace "dd" defined in
> "document.xsd" file? Do I have to define 'doctype'
> attribute differently in the schema?
>
> This is similar to how we define type attribute in
> standard XML schema:
> <xsd:element name="Catalog" type="xsd:string">
>
> Any pointers?
>
> Thanks
>
>
> 	
> 		
> __________________________________
> Do you Yahoo!?
> Win a $20,000 Career Makeover at Yahoo! HotJobs
> http://hotjobs.sweepstakes.yahoo.com/careermakeover
>
Received on Wednesday, 12 May 2004 14:40:42 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:44 GMT