W3C home > Mailing lists > Public > xmlschema-dev@w3.org > September 2010

Re: Adding explicit namespace to attribute name?

From: Rune Stilling <subs@rdfined.dk>
Date: Mon, 20 Sep 2010 20:19:26 +0200
Message-Id: <89D27045-F04C-4179-B929-8C0D81D000F4@rdfined.dk>
To: xmlschema-dev@w3.org
Yes thank you. It was the combination of targetNamespace and form that I fooled around with.

\Rune

Den 20/09/2010 kl. 13.30 skrev Mukul Gandhi:

> The following schema seems to validate the instance document specified
> by you fine:
> 
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
> 
> targetNamespace="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
> 
>   <xs:element name="RDF">
>         <xs:complexType>
> 	      <xs:sequence>
> 		     <xs:element name="Bruger">
>                         <xs:complexType>
> 			      <xs:sequence>
> 				     <xs:element name="Navn">
> 				           <xs:complexType>
> 					       <xs:attribute name="datatype" type="xs:anyURI" form="qualified" />
> 					   </xs:complexType>
> 				     </xs:element>
> 			      </xs:sequence>
> 			      <xs:attribute name="about" type="xs:anyURI" form="qualified" />
> 			 </xs:complexType>
>                    </xs:element>			
> 	       </xs:sequence>
> 	 </xs:complexType>
>   </xs:element>
> 
> </xs:schema>
> 
> 
> On Mon, Sep 20, 2010 at 10:40 AM, Rune Stilling <subs@rdfined.dk> wrote:
>> Hi
>> I'm trying to create a schema for a simple RDF instance XML-file, which
>> could look like this:
>> 
>> <?xml version="1.0"?>
>> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
>> <Bruger
>> rdf:about="http://www.kl.dk/ontologies/brugerontologi.owl#vordingborg">
>> <Navn rdf:datatype="http://www.w3.org/2001/XMLSchema#string"/>
>> </Bruger>
>> </rdf:RDF>
>> 
>> What I cannot do is creating something, that validates the "rdf:" namespace
>> correctly. I've been fiddling with targetNameSpace and form-attributes but
>> it doesn't want to do what I want. Is it possible to create a schema for the
>> above XML-example?
>> \Rune
> 
> 
> 
> -- 
> Regards,
> Mukul Gandhi
> 
Received on Monday, 20 September 2010 18:19:57 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:18 UTC