- From: Mukul Gandhi <gandhi.mukul@gmail.com>
- Date: Mon, 20 Sep 2010 17:00:32 +0530
- To: xmlschema-dev@w3.org
- Cc: subs@rdfined.dk
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 11:31:29 UTC