Re: Adding explicit namespace to attribute name?

Rune Stilling <[email protected]>
Newsgroups gmane.text.xml.schema.devel
Message-ID <[email protected]>
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 <[email protected]> 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
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.