- From: Eric van der Vlist <vdv@dyomedea.com>
- Date: Tue, 17 Oct 2000 16:27:13 +0200
- To: "xmlschema-dev@w3.org" <xmlschema-dev@w3.org>
XSV (or is it me ?) seems confused when referencing a group of elements in another namespace: rss-core.xsd: <?xml version="1.0" encoding="UTF-8"?> <xsd:schema xmlns:xsd="http://www.w3.org/2000/10/XMLSchema" targetNamespace='http://purl.org/rss/1.0/' xmlns:rss="http://purl.org/rss/1.0/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rss091="http://purl.org/rss/1.0/modules/rss091#" elementFormDefault="qualified" > <xsd:import namespace="http://purl.org/rss/1.0/modules/rss091#" schemaLocation="rss-rss091.xsd"/> .../... <xsd:element name="channel" content="elementOnly"> <xsd:complexType> <xsd:sequence> <xsd:element name="title" type="xsd:string" minOccurs="1" maxOccurs="1"/> <xsd:element name="link" type="xsd:uriReference" minOccurs="1" maxOccurs="1"/> <xsd:element name="description" type="xsd:string" minOccurs="1" maxOccurs="1"/> <xsd:element name="image" type="rss:rdfResourceRef" minOccurs="0" maxOccurs="1"/> <xsd:element ref="rss:items" minOccurs="1" maxOccurs="1"/> <xsd:element name="textinput" type="rss:rdfResourceRef" minOccurs="0" maxOccurs="1"/> <xsd:group ref="rss091:inChannel"/> <!-- the idea here is to reference a whole group of elements in the rss091 namespace --> </xsd:sequence> <xsd:attribute ref="rdf:about"/> </xsd:complexType> </xsd:element> ... rss-rss091.xsd <?xml version="1.0" encoding="UTF-8"?> <xsd:schema xmlns:xsd="http://www.w3.org/2000/10/XMLSchema" xmlns:rss="http://purl.org/rss/1.0/" xmlns:rss091="http://purl.org/rss/1.0/modules/rss091#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" targetNamespace='http://purl.org/rss/1.0/modules/rss091#' elementFormDefault="qualified" attributeFormDefault="unqualified" > <xsd:group name="inChannel"> <xsd:sequence> <xsd:element name="language" type="xsd:language" minOccurs="0" maxOccurs="1"/> <xsd:element name="rating" type="xsd:string" minOccurs="0" maxOccurs="1"/> <xsd:element name="managingEditor" type="xsd:string" minOccurs="0" .../... </xsd:sequence> </xsd:group> ... Test file: <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rss091="http://purl.org/rss/modules/rss091/" xmlns="http://purl.org/rss/1.0/"> <channel rdf:about="http://www.mozillazine.org"> <title>MozillaZine</title> <link>http://www.mozillazine.org</link> <description>Your source for Mozilla news, advocacy, interviews, builds, and more! </description> <image rdf:resource="http://www.mozillazine.org/image/mynetscape88.gif"/> <items> <rdf:Seq> <rdf:li resource="http://www.mozillazine.org/talkback.html?article=607"/> <rdf:li resource="http://www.mozillazine.org/talkback.html?article=606"/> <rdf:li resource="http://www.mozillazine.org/talkback.html?article=604"/> <rdf:li resource="http://www.mozillazine.org/talkback.html?article=603"/> </rdf:Seq> </items> <textinput rdf:resource="http://www.mozillazine.org/cgi-bin/sampleonly.cgi"/> <rss091:language xmlns="">en-us</rss091:language> <rss091:rating xmlns="">(PICS-1.1 "http://www.rsac.org/ratingsv01.html" l gen true comment "RSACi North America Server" for "http://www.rsac.org" on "1996.04.16T08:15-0500" r (n 0 s 0 v 0 l 0))</rss091:rating> </channel> ... Error message: http://www.dyomedea.com/tests/rss/rss091-1.out:21:7: Invalid per cvc-complex-type.1.2.4: element {http://purl.org/rss/modules/rss091/}:language not allowed here in element {http://purl.org/rss/1.0/}:channel: http://www.dyomedea.com/tests/rss/rss091-1.out:22:7: Invalid per cvc-complex-type.1.2.4: element {http://purl.org/rss/modules/rss091/}:rating not allowed here in element {http://purl.org/rss/1.0/}:channel: http://www.dyomedea.com/tests/rss/rss091-1.out:21:7: Invalid per src-resolve: undeclared element {http://purl.org/rss/modules/rss091/}:language http://www.dyomedea.com/tests/rss/rss091-1.out:22:7: Invalid per src-resolve: undeclared element {http://purl.org/rss/modules/rss091/}:rating .../... (you can run the test on http://www.dyomedea.com/tests/rss/rss091-1.out and http://www.dyomedea.com/tests/rss/rss-rdf.xsd) Thanks Eric -- ------------------------------------------------------------------------ Eric van der Vlist Dyomedea http://dyomedea.com http://xmlfr.org http://4xt.org http://ducotede.com ------------------------------------------------------------------------
Received on Tuesday, 17 October 2000 10:26:31 UTC