Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » Problem validating a reference to xsd:schema
Problem validating a reference to xsd:schema [message #58774] Wed, 23 March 2005 18:37 Go to next message
Steve Speicher is currently offline Steve Speicher
Messages: 85
Registered: July 2009
Member

This is a multi-part message in MIME format.
--------------070100040301020706020400
Content-Type: multipart/alternative;
boundary="------------040406020303050409060001"


--------------040406020303050409060001
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Hi,

I'm attempting to reference the global element "xsd:schema" within my
schema. But the editor/validator is complaining and I don't know why.

Here's my simple schema:

<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">

<xsd:import namespace="http://www.w3.org/2001/XMLSchema"
schemaLocation="XMLSchema.xsd"/>

<xsd:complexType name="complexType">
<xsd:sequence minOccurs="0" maxOccurs="unbounded">
<xsd:choice>
<xsd:element _ref="xsd:schema"_/>
</xsd:choice>
</xsd:sequence>
</xsd:complexType>

</xsd:schema>

src-resolve: Cannot resolve the name 'xsd:schema' to a(n) element
declaration component.

What am I doing wrong? I've attached my schemas too.

Thanks in advance,
Steve Speicher

--------------040406020303050409060001
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi,<br>
<br>
I'm attempting to reference the global element "xsd:schema" within my
schema.&nbsp; But the editor/validator is complaining and I don't know why.<br>
<br>
Here's my simple schema:<br>
<br>
<blockquote><tt>&lt;?xml version="1.0"?&gt;<br>
&lt;xsd:schema xmlns:xsd=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema">"http://www.w3.org/2001/XMLSchema"</a>
elementFormDefault="qualified"&gt;<br>
<br>
&nbsp;&nbsp;&nbsp; &lt;xsd:import namespace=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema">"http://www.w3.org/2001/XMLSchema"</a>
schemaLocation="XMLSchema.xsd"/&gt;<br>
<br>
&nbsp;&nbsp;&nbsp; &lt;xsd:complexType name="complexType"&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;xsd:sequence minOccurs="0" maxOccurs="unbounded"&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;xsd:choice&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;xsd:element <font color="#ff0000"><u>ref="xsd:schema"</u></font>/&gt; <br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/xsd:choice&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/xsd:sequence&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;/xsd:complexType&gt;<br>
<br>
&lt;/xsd:schema&gt;</tt><br>
</blockquote>
src-resolve: <font color="#ff0000">Cannot resolve the name
'xsd:schema' to a(n) element declaration component.<br>
<br>
<font color="#000000">What am I doing wrong?&nbsp; I've attached my schemas
too.<br>
<br>
Thanks in advance,<br>
Steve Speicher<br>
</font></font>
</body>
</html>

--------------040406020303050409060001--

--------------070100040301020706020400
Content-Type: text/xml;
name="embedded_schema.xsd"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="embedded_schema.xsd"

<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">

<xsd:import namespace="http://www.w3.org/2001/XMLSchema" schemaLocation="XMLSchema.xsd"/>

<xsd:complexType name="complexType">
<xsd:sequence minOccurs="0" maxOccurs="unbounded">
<xsd:choice>
<xsd:element ref="xsd:schema"/>
</xsd:choice>
</xsd:sequence>
</xsd:complexType>

</xsd:schema>

--------------070100040301020706020400
Content-Type: text/xml;
name="XMLSchema.xsd"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="XMLSchema.xsd"

<?xml version='1.0' encoding='UTF-8'?>
<!-- XML Schema schema for XML Schemas: Part 1: Structures -->
<!-- Note this schema is NOT the normative structures schema. -->

<!-- The prose copy in the structures REC is the normative -->

<!-- version (which shouldn't differ from this one except for -->

<!-- this comment and entity expansions, but just in case -->

<!DOCTYPE xs:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "XMLSchema.dtd" [

<!-- provide ID type information even for parsers which only read the
internal subset -->
<!ATTLIST xs:schema id ID #IMPLIED>
<!ATTLIST xs:complexType id ID #IMPLIED>
<!ATTLIST xs:complexContent id ID #IMPLIED>
<!ATTLIST xs:simpleContent id ID #IMPLIED>
<!ATTLIST xs:extension id ID #IMPLIED>
<!ATTLIST xs:element id ID #IMPLIED>
<!ATTLIST xs:group id ID #IMPLIED>
<!ATTLIST xs:all id ID #IMPLIED>
<!ATTLIST xs:choice id ID #IMPLIED>
<!ATTLIST xs:sequence id ID #IMPLIED>
<!ATTLIST xs:any id ID #IMPLIED>
<!ATTLIST xs:anyAttribute id ID #IMPLIED>
<!ATTLIST xs:attribute id ID #IMPLIED>
<!ATTLIST xs:attributeGroup id ID #IMPLIED>
<!ATTLIST xs:unique id ID #IMPLIED>
<!ATTLIST xs:key id ID #IMPLIED>
<!ATTLIST xs:keyref id ID #IMPLIED>
<!ATTLIST xs:selector id ID #IMPLIED>
<!ATTLIST xs:field id ID #IMPLIED>
<!ATTLIST xs:include id ID #IMPLIED>
<!ATTLIST xs:import id ID #IMPLIED>
<!ATTLIST xs:redefine id ID #IMPLIED>
<!ATTLIST xs:notation id ID #IMPLIED>
<!--
keep this schema XML1.0 DTD valid
-->
<!ENTITY % schemaAttrs 'xmlns:hfp CDATA #IMPLIED'>

<!ELEMENT hfp:hasFacet EMPTY>
<!ATTLIST hfp:hasFacet
name NMTOKEN #REQUIRED>

<!ELEMENT hfp:hasProperty EMPTY>
<!ATTLIST hfp:hasProperty
name NMTOKEN #REQUIRED
value CDATA #REQUIRED>
<!--
Make sure that processors that do not read the external
subset will know about the various IDs we declare
-->
<!ATTLIST xs:simpleType id ID #IMPLIED>
<!ATTLIST xs:maxExclusive id ID #IMPLIED>
<!ATTLIST xs:minExclusive id ID #IMPLIED>
<!ATTLIST xs:maxInclusive id ID #IMPLIED>
<!ATTLIST xs:minInclusive id ID #IMPLIED>
<!ATTLIST xs:totalDigits id ID #IMPLIED>
<!ATTLIST xs:fractionDigits id ID #IMPLIED>
<!ATTLIST xs:length id ID #IMPLIED>
<!ATTLIST xs:minLength id ID #IMPLIED>
<!ATTLIST xs:maxLength id ID #IMPLIED>
<!ATTLIST xs:enumeration id ID #IMPLIED>
<!ATTLIST xs:pattern id ID #IMPLIED>
<!ATTLIST xs:appinfo id ID #IMPLIED>
<!ATTLIST xs:documentation id ID #IMPLIED>
<!ATTLIST xs:list id ID #IMPLIED>
<!ATTLIST xs:union id ID #IMPLIED>
]>
<xs:schema targetNamespace="http://www.w3.org/2001/XMLSchema" blockDefault="#all" elementFormDefault="qualified" version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" xml:lang="EN" xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty">
<xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>

<xs:element name="schema" id="schema">
<xs:complexType>
<xs:sequence>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="include" type="xs:anyURI"/>
</xs:choice>
</xs:sequence>
<xs:attribute name="targetNamespace" type="xs:anyURI"/>
<xs:attribute name="version" type="xs:normalizedString"/>
<xs:attribute name="id" type="xs:ID"/>
<xs:attribute ref="xml:lang"/>
</xs:complexType>

<xs:key name="element">
<xs:selector xpath="xs:element"/>
<xs:field xpath="@name"/>
</xs:key>

<xs:key name="attribute">
<xs:selector xpath="xs:attribute"/>
<xs:field xpath="@name"/>
</xs:key>

<xs:key name="type">
<xs:selector xpath="xs:complexType|xs:simpleType"/>
<xs:field xpath="@name"/>
</xs:key>

<xs:key name="group">
<xs:selector xpath="xs:group"/>
<xs:field xpath="@name"/>
</xs:key>

<xs:key name="attributeGroup">
<xs:selector xpath="xs:attributeGroup"/>
<xs:field xpath="@name"/>
</xs:key>

<xs:key name="notation">
<xs:selector xpath="xs:notation"/>
<xs:field xpath="@name"/>
</xs:key>

<xs:key name="identityConstraint">
<xs:selector xpath=".//xs:key|.//xs:unique|.//xs:keyref"/>
<xs:field xpath="@name"/>
</xs:key>

</xs:element>

</xs:schema>

--------------070100040301020706020400--
Re: Problem validating a reference to xsd:schema [message #58802 is a reply to message #58774] Wed, 23 March 2005 19:25 Go to previous messageGo to next message
Eclipse User
Originally posted by: merks.ca.ibm.com

This is a multi-part message in MIME format.
--------------000004020701000707010309
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Steve,

I could not reproduce your problem:

$ xsd-test.bat -validate ~/workspace/simple/schemas/embedded_schema.xsd
-->
file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/embedded_schema.xsd
-->
file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/XMLSchema.xsd
Error: URI
file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/XMLSchema.xsd
Line 78 Column 54
XSD: Type reference 'http://www.w3.org/2001/XMLSchema#anyURI' is
unresolved
Error: URI
file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/XMLSchema.xsd
Line 81 Column 20
XSD: Type reference 'http://www.w3.org/2001/XMLSchema#anyURI' is
unresolved
Error: URI
file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/XMLSchema.xsd
Line 82 Column 61
XSD: Type reference
'http://www.w3.org/2001/XMLSchema#normalizedString' is unresolved
Error: URI
file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/XMLSchema.xsd
Line 83 Column 63
XSD: Type reference 'http://www.w3.org/2001/XMLSchema#ID' is unresolved
--> http://www.w3.org/2001/xml.xsd



Steve Speicher wrote:

> Hi,
>
> I'm attempting to reference the global element "xsd:schema" within my
> schema. But the editor/validator is complaining and I don't know why.
>
> Here's my simple schema:
>
> <?xml version="1.0"?>
> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> elementFormDefault="qualified">
>
> <xsd:import namespace="http://www.w3.org/2001/XMLSchema"
> schemaLocation="XMLSchema.xsd"/>
>
> <xsd:complexType name="complexType">
> <xsd:sequence minOccurs="0" maxOccurs="unbounded">
> <xsd:choice>
> <xsd:element _ref="xsd:schema"_/>
> </xsd:choice>
> </xsd:sequence>
> </xsd:complexType>
>
> </xsd:schema>
>
> src-resolve: Cannot resolve the name 'xsd:schema' to a(n) element
> declaration component.
>
> What am I doing wrong? I've attached my schemas too.
>
> Thanks in advance,
> Steve Speicher
>
> ------------------------------------------------------------ ------------
>
><?xml version="1.0"?>
><xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
>
> <xsd:import namespace="http://www.w3.org/2001/XMLSchema" schemaLocation="XMLSchema.xsd"/>
>
> <xsd:complexType name="complexType">
> <xsd:sequence minOccurs="0" maxOccurs="unbounded">
> <xsd:choice>
> <xsd:element ref="xsd:schema"/>
> </xsd:choice>
> </xsd:sequence>
> </xsd:complexType>
>
></xsd:schema>
>
>
> ------------------------------------------------------------ ------------
>
><?xml version='1.0' encoding='UTF-8'?>
><!-- XML Schema schema for XML Schemas: Part 1: Structures -->
><!-- Note this schema is NOT the normative structures schema. -->
>
><!-- The prose copy in the structures REC is the normative -->
>
><!-- version (which shouldn't differ from this one except for -->
>
><!-- this comment and entity expansions, but just in case -->
>
><!DOCTYPE xs:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "XMLSchema.dtd" [
>
><!-- provide ID type information even for parsers which only read the
> internal subset -->
><!ATTLIST xs:schema id ID #IMPLIED>
><!ATTLIST xs:complexType id ID #IMPLIED>
><!ATTLIST xs:complexContent id ID #IMPLIED>
><!ATTLIST xs:simpleContent id ID #IMPLIED>
><!ATTLIST xs:extension id ID #IMPLIED>
><!ATTLIST xs:element id ID #IMPLIED>
><!ATTLIST xs:group id ID #IMPLIED>
><!ATTLIST xs:all id ID #IMPLIED>
><!ATTLIST xs:choice id ID #IMPLIED>
><!ATTLIST xs:sequence id ID #IMPLIED>
><!ATTLIST xs:any id ID #IMPLIED>
><!ATTLIST xs:anyAttribute id ID #IMPLIED>
><!ATTLIST xs:attribute id ID #IMPLIED>
><!ATTLIST xs:attributeGroup id ID #IMPLIED>
><!ATTLIST xs:unique id ID #IMPLIED>
><!ATTLIST xs:key id ID #IMPLIED>
><!ATTLIST xs:keyref id ID #IMPLIED>
><!ATTLIST xs:selector id ID #IMPLIED>
><!ATTLIST xs:field id ID #IMPLIED>
><!ATTLIST xs:include id ID #IMPLIED>
><!ATTLIST xs:import id ID #IMPLIED>
><!ATTLIST xs:redefine id ID #IMPLIED>
><!ATTLIST xs:notation id ID #IMPLIED>
><!--
> keep this schema XML1.0 DTD valid
> -->
> <!ENTITY % schemaAttrs 'xmlns:hfp CDATA #IMPLIED'>
>
> <!ELEMENT hfp:hasFacet EMPTY>
> <!ATTLIST hfp:hasFacet
> name NMTOKEN #REQUIRED>
>
> <!ELEMENT hfp:hasProperty EMPTY>
> <!ATTLIST hfp:hasProperty
> name NMTOKEN #REQUIRED
> value CDATA #REQUIRED>
><!--
> Make sure that processors that do not read the external
> subset will know about the various IDs we declare
> -->
> <!ATTLIST xs:simpleType id ID #IMPLIED>
> <!ATTLIST xs:maxExclusive id ID #IMPLIED>
> <!ATTLIST xs:minExclusive id ID #IMPLIED>
> <!ATTLIST xs:maxInclusive id ID #IMPLIED>
> <!ATTLIST xs:minInclusive id ID #IMPLIED>
> <!ATTLIST xs:totalDigits id ID #IMPLIED>
> <!ATTLIST xs:fractionDigits id ID #IMPLIED>
> <!ATTLIST xs:length id ID #IMPLIED>
> <!ATTLIST xs:minLength id ID #IMPLIED>
> <!ATTLIST xs:maxLength id ID #IMPLIED>
> <!ATTLIST xs:enumeration id ID #IMPLIED>
> <!ATTLIST xs:pattern id ID #IMPLIED>
> <!ATTLIST xs:appinfo id ID #IMPLIED>
> <!ATTLIST xs:documentation id ID #IMPLIED>
> <!ATTLIST xs:list id ID #IMPLIED>
> <!ATTLIST xs:union id ID #IMPLIED>
> ]>
><xs:schema targetNamespace="http://www.w3.org/2001/XMLSchema" blockDefault="#all" elementFormDefault="qualified" version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" xml:lang="EN" xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty">
> <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
>
> <xs:element name="schema" id="schema">
> <xs:complexType>
> <xs:sequence>
> <xs:choice minOccurs="0" maxOccurs="unbounded">
> <xs:element name="include" type="xs:anyURI"/>
> </xs:choice>
> </xs:sequence>
> <xs:attribute name="targetNamespace" type="xs:anyURI"/>
> <xs:attribute name="version" type="xs:normalizedString"/>
> <xs:attribute name="id" type="xs:ID"/>
> <xs:attribute ref="xml:lang"/>
> </xs:complexType>
>
> <xs:key name="element">
> <xs:selector xpath="xs:element"/>
> <xs:field xpath="@name"/>
> </xs:key>
>
> <xs:key name="attribute">
> <xs:selector xpath="xs:attribute"/>
> <xs:field xpath="@name"/>
> </xs:key>
>
> <xs:key name="type">
> <xs:selector xpath="xs:complexType|xs:simpleType"/>
> <xs:field xpath="@name"/>
> </xs:key>
>
> <xs:key name="group">
> <xs:selector xpath="xs:group"/>
> <xs:field xpath="@name"/>
> </xs:key>
>
> <xs:key name="attributeGroup">
> <xs:selector xpath="xs:attributeGroup"/>
> <xs:field xpath="@name"/>
> </xs:key>
>
> <xs:key name="notation">
> <xs:selector xpath="xs:notation"/>
> <xs:field xpath="@name"/>
> </xs:key>
>
> <xs:key name="identityConstraint">
> <xs:selector xpath=".//xs:key|.//xs:unique|.//xs:keyref"/>
> <xs:field xpath="@name"/>
> </xs:key>
>
> </xs:element>
>
></xs:schema>
>
>


--------------000004020701000707010309
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Steve,<br>
<br>
I could not reproduce your problem:<br>
<blockquote>$ xsd-test.bat -validate
~/workspace/simple/schemas/embedded_schema.xsd<br>
--&gt;
<a class="moz-txt-link-freetext" href=" file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/embedded_schema.xsd "> file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/embedded_schema.xsd </a><br>
--&gt;
<a class="moz-txt-link-freetext" href=" file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/XMLSchema.xsd "> file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/XMLSchema.xsd </a><br>
Error: URI
<a class="moz-txt-link-freetext" href=" file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/XMLSchema.xsd "> file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/XMLSchema.xsd </a>
Line 78 Column 54<br>
XSD: Type reference '<a class="moz-txt-link-freetext" href="http://www.w3.org/2001/XMLSchema#anyURI">http://www.w3.org/2001/XMLSchema#anyURI</a>' is
unresolved<br>
Error: URI
<a class="moz-txt-link-freetext" href=" file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/XMLSchema.xsd "> file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/XMLSchema.xsd </a>
Line 81 Column 20<br>
XSD: Type reference '<a class="moz-txt-link-freetext" href="http://www.w3.org/2001/XMLSchema#anyURI">http://www.w3.org/2001/XMLSchema#anyURI</a>' is
unresolved<br>
Error: URI
<a class="moz-txt-link-freetext" href=" file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/XMLSchema.xsd "> file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/XMLSchema.xsd </a>
Line 82 Column 61<br>
XSD: Type reference '<a class="moz-txt-link-freetext" href="http://www.w3.org/2001/XMLSchema#normalizedString">http://www.w3.org/2001/XMLSchema#normalizedString</a>'
is unresolved<br>
Error: URI
<a class="moz-txt-link-freetext" href=" file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/XMLSchema.xsd "> file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/XMLSchema.xsd </a>
Line 83 Column 63<br>
XSD: Type reference '<a class="moz-txt-link-freetext" href="http://www.w3.org/2001/XMLSchema#ID">http://www.w3.org/2001/XMLSchema#ID</a>' is unresolved<br>
--&gt; <a class="moz-txt-link-freetext" href="http://www.w3.org/2001/xml.xsd">http://www.w3.org/2001/xml.xsd</a><br>
</blockquote>
<br>
<br>
Steve Speicher wrote:
<blockquote cite="midd1shqn$15b$1@news.eclipse.org" type="cite">
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
Hi,<br>
<br>
I'm attempting to reference the global element "xsd:schema" within my
schema.&nbsp; But the editor/validator is complaining and I don't know why.<br>
<br>
Here's my simple schema:<br>
<br>
<blockquote><tt>&lt;?xml version="1.0"?&gt;<br>
&lt;xsd:schema xmlns:xsd=<a class="moz-txt-link-rfc2396E"
href="http://www.w3.org/2001/XMLSchema">"http://www.w3.org/2001/XMLSchema"</a>
elementFormDefault="qualified"&gt;<br>
<br>
&nbsp;&nbsp;&nbsp; &lt;xsd:import namespace=<a class="moz-txt-link-rfc2396E"
href="http://www.w3.org/2001/XMLSchema">"http://www.w3.org/2001/XMLSchema"</a>
schemaLocation="XMLSchema.xsd"/&gt;<br>
<br>
&nbsp;&nbsp;&nbsp; &lt;xsd:complexType name="complexType"&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;xsd:sequence minOccurs="0" maxOccurs="unbounded"&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;xsd:choice&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;xsd:element <font color="#ff0000"><u>ref="xsd:schema"</u></font>/&gt; <br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/xsd:choice&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/xsd:sequence&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;/xsd:complexType&gt;<br>
<br>
&lt;/xsd:schema&gt;</tt><br>
</blockquote>
src-resolve: <font color="#ff0000">Cannot resolve the name
'xsd:schema' to a(n) element declaration component.<br>
<br>
<font color="#000000">What am I doing wrong?&nbsp; I've attached my
schemas
too.<br>
<br>
Thanks in advance,<br>
Steve Speicher<br>
</font></font>
<pre wrap="">
<hr size="4" width="90%">
&lt;?xml version="1.0"?&gt;
&lt;xsd:schema xmlns:xsd=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema">"http://www.w3.org/2001/XMLSchema"</a> elementFormDefault="qualified"&gt;

&lt;xsd:import namespace=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema">"http://www.w3.org/2001/XMLSchema"</a> schemaLocation="XMLSchema.xsd"/&gt;

&lt;xsd:complexType name="complexType"&gt;
&lt;xsd:sequence minOccurs="0" maxOccurs="unbounded"&gt;
&lt;xsd:choice&gt;
&lt;xsd:element ref="xsd:schema"/&gt;
&lt;/xsd:choice&gt;
&lt;/xsd:sequence&gt;
&lt;/xsd:complexType&gt;

&lt;/xsd:schema&gt;
</pre>
<pre wrap="">
<hr size="4" width="90%">
&lt;?xml version='1.0' encoding='UTF-8'?&gt;
&lt;!-- XML Schema schema for XML Schemas: Part 1: Structures --&gt;
&lt;!-- Note this schema is NOT the normative structures schema. --&gt;

&lt;!-- The prose copy in the structures REC is the normative --&gt;

&lt;!-- version (which shouldn't differ from this one except for --&gt;

&lt;!-- this comment and entity expansions, but just in case --&gt;

&lt;!DOCTYPE xs:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "XMLSchema.dtd" [

&lt;!-- provide ID type information even for parsers which only read the
internal subset --&gt;
&lt;!ATTLIST xs:schema id ID #IMPLIED&gt;
&lt;!ATTLIST xs:complexType id ID #IMPLIED&gt;
&lt;!ATTLIST xs:complexContent id ID #IMPLIED&gt;
&lt;!ATTLIST xs:simpleContent id ID #IMPLIED&gt;
&lt;!ATTLIST xs:extension id ID #IMPLIED&gt;
&lt;!ATTLIST xs:element id ID #IMPLIED&gt;
&lt;!ATTLIST xs:group id ID #IMPLIED&gt;
&lt;!ATTLIST xs:all id ID #IMPLIED&gt;
&lt;!ATTLIST xs:choice id ID #IMPLIED&gt;
&lt;!ATTLIST xs:sequence id ID #IMPLIED&gt;
&lt;!ATTLIST xs:any id ID #IMPLIED&gt;
&lt;!ATTLIST xs:anyAttribute id ID #IMPLIED&gt;
&lt;!ATTLIST xs:attribute id ID #IMPLIED&gt;
&lt;!ATTLIST xs:attributeGroup id ID #IMPLIED&gt;
&lt;!ATTLIST xs:unique id ID #IMPLIED&gt;
&lt;!ATTLIST xs:key id ID #IMPLIED&gt;
&lt;!ATTLIST xs:keyref id ID #IMPLIED&gt;
&lt;!ATTLIST xs:selector id ID #IMPLIED&gt;
&lt;!ATTLIST xs:field id ID #IMPLIED&gt;
&lt;!ATTLIST xs:include id ID #IMPLIED&gt;
&lt;!ATTLIST xs:import id ID #IMPLIED&gt;
&lt;!ATTLIST xs:redefine id ID #IMPLIED&gt;
&lt;!ATTLIST xs:notation id ID #IMPLIED&gt;
&lt;!--
keep this schema XML1.0 DTD valid
--&gt;
&lt;!ENTITY % schemaAttrs 'xmlns:hfp CDATA #IMPLIED'&gt;

&lt;!ELEMENT hfp:hasFacet EMPTY&gt;
&lt;!ATTLIST hfp:hasFacet
name NMTOKEN #REQUIRED&gt;

&lt;!ELEMENT hfp:hasProperty EMPTY&gt;
&lt;!ATTLIST hfp:hasProperty
name NMTOKEN #REQUIRED
value CDATA #REQUIRED&gt;
&lt;!--
Make sure that processors that do not read the external
subset will know about the various IDs we declare
--&gt;
&lt;!ATTLIST xs:simpleType id ID #IMPLIED&gt;
&lt;!ATTLIST xs:maxExclusive id ID #IMPLIED&gt;
&lt;!ATTLIST xs:minExclusive id ID #IMPLIED&gt;
&lt;!ATTLIST xs:maxInclusive id ID #IMPLIED&gt;
&lt;!ATTLIST xs:minInclusive id ID #IMPLIED&gt;
&lt;!ATTLIST xs:totalDigits id ID #IMPLIED&gt;
&lt;!ATTLIST xs:fractionDigits id ID #IMPLIED&gt;
&lt;!ATTLIST xs:length id ID #IMPLIED&gt;
&lt;!ATTLIST xs:minLength id ID #IMPLIED&gt;
&lt;!ATTLIST xs:maxLength id ID #IMPLIED&gt;
&lt;!ATTLIST xs:enumeration id ID #IMPLIED&gt;
&lt;!ATTLIST xs:pattern id ID #IMPLIED&gt;
&lt;!ATTLIST xs:appinfo id ID #IMPLIED&gt;
&lt;!ATTLIST xs:documentation id ID #IMPLIED&gt;
&lt;!ATTLIST xs:list id ID #IMPLIED&gt;
&lt;!ATTLIST xs:union id ID #IMPLIED&gt;
]&gt;
&lt;xs:schema targetNamespace=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema">"http://www.w3.org/2001/XMLSchema"</a> blockDefault="#all" elementFormDefault="qualified" version="1.0" xmlns:xs=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema">"http://www.w3.org/2001/XMLSchema"</a<a class="moz-txt-link-rfc2396E" href="xml:lang=">" xml:lang="</a>EN" xmlns:hfp=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty">"http://www.w3.org/2001/XMLSchema-hasFacetAndProperty"</a>&gt;
&lt;xs:import namespace=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/XML/1998/namespace">"http://www.w3.org/XML/1998/namespace"</a> schemaLocation=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/xml.xsd">"http://www.w3.org/2001/xml.xsd"</a>/&gt;

&lt;xs:element name="schema" id="schema"&gt;
&lt;xs:complexType&gt;
&lt;xs:sequence&gt;
&lt;xs:choice minOccurs="0" maxOccurs="unbounded"&gt;
&lt;xs:element name="include" type="xs:anyURI"/&gt;
&lt;/xs:choice&gt;
&lt;/xs:sequence&gt;
&lt;xs:attribute name="targetNamespace" type="xs:anyURI"/&gt;
&lt;xs:attribute name="version" type="xs:normalizedString"/&gt;
&lt;xs:attribute name="id" type="xs:ID"/&gt;
&lt;xs:attribute ref=<a class="moz-txt-link-rfc2396E" href="xml:lang">"xml:lang"</a>/&gt;
&lt;/xs:complexType&gt;

&lt;xs:key name="element"&gt;
&lt;xs:selector xpath="xs:element"/&gt;
&lt;xs:field xpath="@name"/&gt;
&lt;/xs:key&gt;

&lt;xs:key name="attribute"&gt;
&lt;xs:selector xpath="xs:attribute"/&gt;
&lt;xs:field xpath="@name"/&gt;
&lt;/xs:key&gt;

&lt;xs:key name="type"&gt;
&lt;xs:selector xpath="xs:complexType|xs:simpleType"/&gt;
&lt;xs:field xpath="@name"/&gt;
&lt;/xs:key&gt;

&lt;xs:key name="group"&gt;
&lt;xs:selector xpath="xs:group"/&gt;
&lt;xs:field xpath="@name"/&gt;
&lt;/xs:key&gt;

&lt;xs:key name="attributeGroup"&gt;
&lt;xs:selector xpath="xs:attributeGroup"/&gt;
&lt;xs:field xpath="@name"/&gt;
&lt;/xs:key&gt;

&lt;xs:key name="notation"&gt;
&lt;xs:selector xpath="xs:notation"/&gt;
&lt;xs:field xpath="@name"/&gt;
&lt;/xs:key&gt;

&lt;xs:key name="identityConstraint"&gt;
&lt;xs:selector xpath=".//xs:key|.//xs:unique|.//xs:keyref"/&gt;
&lt;xs:field xpath="@name"/&gt;
&lt;/xs:key&gt;

&lt;/xs:element&gt;

&lt;/xs:schema&gt;
</pre>
</blockquote>
<br>
</body>
</html>

--------------000004020701000707010309--
Re: Problem validating a reference to xsd:schema [message #58827 is a reply to message #58802] Wed, 23 March 2005 19:40 Go to previous message
Steve Speicher is currently offline Steve Speicher
Messages: 85
Registered: July 2009
Member

This is a multi-part message in MIME format.
--------------030303050502070205020500
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Ed,

I wrongly included the "shortened" version of XMLSchema.xsd. Anyway,
without having done anything (other than restarting Eclipse a couple
times)...it appears to be fine.

Perhaps it is just an autonomic schema.

- Steve

Ed Merks wrote:

> Steve,
>
> I could not reproduce your problem:
>
> $ xsd-test.bat -validate
> ~/workspace/simple/schemas/embedded_schema.xsd
> -->
> file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/embedded_schema.xsd
> -->
> file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/XMLSchema.xsd
> Error: URI
> file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/XMLSchema.xsd
> Line 78 Column 54
> XSD: Type reference 'http://www.w3.org/2001/XMLSchema#anyURI' is
> unresolved
> Error: URI
> file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/XMLSchema.xsd
> Line 81 Column 20
> XSD: Type reference 'http://www.w3.org/2001/XMLSchema#anyURI' is
> unresolved
> Error: URI
> file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/XMLSchema.xsd
> Line 82 Column 61
> XSD: Type reference
> 'http://www.w3.org/2001/XMLSchema#normalizedString' is unresolved
> Error: URI
> file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/XMLSchema.xsd
> Line 83 Column 63
> XSD: Type reference 'http://www.w3.org/2001/XMLSchema#ID' is
> unresolved
> --> http://www.w3.org/2001/xml.xsd
>
>
>
> Steve Speicher wrote:
>
>> Hi,
>>
>> I'm attempting to reference the global element "xsd:schema" within my
>> schema. But the editor/validator is complaining and I don't know why.
>>
>> Here's my simple schema:
>>
>> <?xml version="1.0"?>
>> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>> elementFormDefault="qualified">
>>
>> <xsd:import namespace="http://www.w3.org/2001/XMLSchema"
>> schemaLocation="XMLSchema.xsd"/>
>>
>> <xsd:complexType name="complexType">
>> <xsd:sequence minOccurs="0" maxOccurs="unbounded">
>> <xsd:choice>
>> <xsd:element _ref="xsd:schema"_/>
>> </xsd:choice>
>> </xsd:sequence>
>> </xsd:complexType>
>>
>> </xsd:schema>
>>
>> src-resolve: Cannot resolve the name 'xsd:schema' to a(n) element
>> declaration component.
>>
>> What am I doing wrong? I've attached my schemas too.
>>
>> Thanks in advance,
>> Steve Speicher
>>
>> ------------------------------------------------------------ ------------
>>
>><?xml version="1.0"?>
>><xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
>>
>> <xsd:import namespace="http://www.w3.org/2001/XMLSchema" schemaLocation="XMLSchema.xsd"/>
>>
>> <xsd:complexType name="complexType">
>> <xsd:sequence minOccurs="0" maxOccurs="unbounded">
>> <xsd:choice>
>> <xsd:element ref="xsd:schema"/>
>> </xsd:choice>
>> </xsd:sequence>
>> </xsd:complexType>
>>
>></xsd:schema>
>>
>>
>> ------------------------------------------------------------ ------------
>>
>><?xml version='1.0' encoding='UTF-8'?>
>><!-- XML Schema schema for XML Schemas: Part 1: Structures -->
>><!-- Note this schema is NOT the normative structures schema. -->
>>
>><!-- The prose copy in the structures REC is the normative -->
>>
>><!-- version (which shouldn't differ from this one except for -->
>>
>><!-- this comment and entity expansions, but just in case -->
>>
>><!DOCTYPE xs:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "XMLSchema.dtd" [
>>
>><!-- provide ID type information even for parsers which only read the
>> internal subset -->
>><!ATTLIST xs:schema id ID #IMPLIED>
>><!ATTLIST xs:complexType id ID #IMPLIED>
>><!ATTLIST xs:complexContent id ID #IMPLIED>
>><!ATTLIST xs:simpleContent id ID #IMPLIED>
>><!ATTLIST xs:extension id ID #IMPLIED>
>><!ATTLIST xs:element id ID #IMPLIED>
>><!ATTLIST xs:group id ID #IMPLIED>
>><!ATTLIST xs:all id ID #IMPLIED>
>><!ATTLIST xs:choice id ID #IMPLIED>
>><!ATTLIST xs:sequence id ID #IMPLIED>
>><!ATTLIST xs:any id ID #IMPLIED>
>><!ATTLIST xs:anyAttribute id ID #IMPLIED>
>><!ATTLIST xs:attribute id ID #IMPLIED>
>><!ATTLIST xs:attributeGroup id ID #IMPLIED>
>><!ATTLIST xs:unique id ID #IMPLIED>
>><!ATTLIST xs:key id ID #IMPLIED>
>><!ATTLIST xs:keyref id ID #IMPLIED>
>><!ATTLIST xs:selector id ID #IMPLIED>
>><!ATTLIST xs:field id ID #IMPLIED>
>><!ATTLIST xs:include id ID #IMPLIED>
>><!ATTLIST xs:import id ID #IMPLIED>
>><!ATTLIST xs:redefine id ID #IMPLIED>
>><!ATTLIST xs:notation id ID #IMPLIED>
>><!--
>> keep this schema XML1.0 DTD valid
>> -->
>> <!ENTITY % schemaAttrs 'xmlns:hfp CDATA #IMPLIED'>
>>
>> <!ELEMENT hfp:hasFacet EMPTY>
>> <!ATTLIST hfp:hasFacet
>> name NMTOKEN #REQUIRED>
>>
>> <!ELEMENT hfp:hasProperty EMPTY>
>> <!ATTLIST hfp:hasProperty
>> name NMTOKEN #REQUIRED
>> value CDATA #REQUIRED>
>><!--
>> Make sure that processors that do not read the external
>> subset will know about the various IDs we declare
>> -->
>> <!ATTLIST xs:simpleType id ID #IMPLIED>
>> <!ATTLIST xs:maxExclusive id ID #IMPLIED>
>> <!ATTLIST xs:minExclusive id ID #IMPLIED>
>> <!ATTLIST xs:maxInclusive id ID #IMPLIED>
>> <!ATTLIST xs:minInclusive id ID #IMPLIED>
>> <!ATTLIST xs:totalDigits id ID #IMPLIED>
>> <!ATTLIST xs:fractionDigits id ID #IMPLIED>
>> <!ATTLIST xs:length id ID #IMPLIED>
>> <!ATTLIST xs:minLength id ID #IMPLIED>
>> <!ATTLIST xs:maxLength id ID #IMPLIED>
>> <!ATTLIST xs:enumeration id ID #IMPLIED>
>> <!ATTLIST xs:pattern id ID #IMPLIED>
>> <!ATTLIST xs:appinfo id ID #IMPLIED>
>> <!ATTLIST xs:documentation id ID #IMPLIED>
>> <!ATTLIST xs:list id ID #IMPLIED>
>> <!ATTLIST xs:union id ID #IMPLIED>
>> ]>
>><xs:schema targetNamespace="http://www.w3.org/2001/XMLSchema" blockDefault="#all" elementFormDefault="qualified" version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema"" xml:lang="EN" xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty">
>> <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
>>
>> <xs:element name="schema" id="schema">
>> <xs:complexType>
>> <xs:sequence>
>> <xs:choice minOccurs="0" maxOccurs="unbounded">
>> <xs:element name="include" type="xs:anyURI"/>
>> </xs:choice>
>> </xs:sequence>
>> <xs:attribute name="targetNamespace" type="xs:anyURI"/>
>> <xs:attribute name="version" type="xs:normalizedString"/>
>> <xs:attribute name="id" type="xs:ID"/>
>> <xs:attribute ref="xml:lang"/>
>> </xs:complexType>
>>
>> <xs:key name="element">
>> <xs:selector xpath="xs:element"/>
>> <xs:field xpath="@name"/>
>> </xs:key>
>>
>> <xs:key name="attribute">
>> <xs:selector xpath="xs:attribute"/>
>> <xs:field xpath="@name"/>
>> </xs:key>
>>
>> <xs:key name="type">
>> <xs:selector xpath="xs:complexType|xs:simpleType"/>
>> <xs:field xpath="@name"/>
>> </xs:key>
>>
>> <xs:key name="group">
>> <xs:selector xpath="xs:group"/>
>> <xs:field xpath="@name"/>
>> </xs:key>
>>
>> <xs:key name="attributeGroup">
>> <xs:selector xpath="xs:attributeGroup"/>
>> <xs:field xpath="@name"/>
>> </xs:key>
>>
>> <xs:key name="notation">
>> <xs:selector xpath="xs:notation"/>
>> <xs:field xpath="@name"/>
>> </xs:key>
>>
>> <xs:key name="identityConstraint">
>> <xs:selector xpath=".//xs:key|.//xs:unique|.//xs:keyref"/>
>> <xs:field xpath="@name"/>
>> </xs:key>
>>
>> </xs:element>
>>
>></xs:schema>
>>
>>
>

--------------030303050502070205020500
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Ed,<br>
<br>
I wrongly included the "shortened" version of XMLSchema.xsd.&nbsp; Anyway,
without having done anything (other than restarting Eclipse a couple
times)...it appears to be fine.<br>
<br>
Perhaps it is just an autonomic schema.<br>
<br>
- Steve<br>
<br>
Ed Merks wrote:
<blockquote cite="midd1skks$4om$1@news.eclipse.org" type="cite">
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
Steve,<br>
<br>
I could not reproduce your problem:<br>
<blockquote>$ xsd-test.bat -validate
~/workspace/simple/schemas/embedded_schema.xsd<br>
--&gt;
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href=" file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/embedded_schema.xsd "> file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/embedded_schema.xsd </a><br>
--&gt;
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href=" file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/XMLSchema.xsd "> file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/XMLSchema.xsd </a><br>
Error: URI
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href=" file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/XMLSchema.xsd "> file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/XMLSchema.xsd </a>
Line 78 Column 54<br>
XSD: Type reference '<a class="moz-txt-link-freetext"
href="http://www.w3.org/2001/XMLSchema#anyURI">http://www.w3.org/2001/XMLSchema#anyURI</a>'
is
unresolved<br>
Error: URI
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href=" file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/XMLSchema.xsd "> file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/XMLSchema.xsd </a>
Line 81 Column 20<br>
XSD: Type reference '<a class="moz-txt-link-freetext"
href="http://www.w3.org/2001/XMLSchema#anyURI">http://www.w3.org/2001/XMLSchema#anyURI</a>'
is
unresolved<br>
Error: URI
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href=" file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/XMLSchema.xsd "> file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/XMLSchema.xsd </a>
Line 82 Column 61<br>
XSD: Type reference '<a class="moz-txt-link-freetext"
href="http://www.w3.org/2001/XMLSchema#normalizedString">http://www.w3.org/2001/XMLSchema#normalizedString</a>'
is unresolved<br>
Error: URI
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href=" file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/XMLSchema.xsd "> file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/XMLSchema.xsd </a>
Line 83 Column 63<br>
XSD: Type reference '<a class="moz-txt-link-freetext"
href="http://www.w3.org/2001/XMLSchema#ID">http://www.w3.org/2001/XMLSchema#ID</a>'
is unresolved<br>
--&gt; <a class="moz-txt-link-freetext"
href="http://www.w3.org/2001/xml.xsd">http://www.w3.org/2001/xml.xsd</a><br>
</blockquote>
<br>
<br>
Steve Speicher wrote:
<blockquote cite="midd1shqn$15b$1@news.eclipse.org" type="cite">
<meta content="text/html;charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
Hi,<br>
<br>
I'm attempting to reference the global element "xsd:schema" within my
schema.&nbsp; But the editor/validator is complaining and I don't know why.<br>
<br>
Here's my simple schema:<br>
<br>
<blockquote><tt>&lt;?xml version="1.0"?&gt;<br>
&lt;xsd:schema xmlns:xsd=<a class="moz-txt-link-rfc2396E"
href="http://www.w3.org/2001/XMLSchema">"http://www.w3.org/2001/XMLSchema"</a>
elementFormDefault="qualified"&gt;<br>
<br>
&nbsp;&nbsp;&nbsp; &lt;xsd:import namespace=<a class="moz-txt-link-rfc2396E"
href="http://www.w3.org/2001/XMLSchema">"http://www.w3.org/2001/XMLSchema"</a>
schemaLocation="XMLSchema.xsd"/&gt;<br>
<br>
&nbsp;&nbsp;&nbsp; &lt;xsd:complexType name="complexType"&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;xsd:sequence minOccurs="0" maxOccurs="unbounded"&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;xsd:choice&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;xsd:element <font color="#ff0000"><u>ref="xsd:schema"</u></font>/&gt; <br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/xsd:choice&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/xsd:sequence&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;/xsd:complexType&gt;<br>
<br>
&lt;/xsd:schema&gt;</tt><br>
</blockquote>
src-resolve: <font color="#ff0000">Cannot resolve the name
'xsd:schema' to a(n) element declaration component.<br>
<br>
<font color="#000000">What am I doing wrong?&nbsp; I've attached my
schemas
too.<br>
<br>
Thanks in advance,<br>
Steve Speicher<br>
</font></font>
<pre wrap=""><hr size="4" width="90%">
&lt;?xml version="1.0"?&gt;
&lt;xsd:schema xmlns:xsd=<a class="moz-txt-link-rfc2396E"
href="http://www.w3.org/2001/XMLSchema">"http://www.w3.org/2001/XMLSchema"</a> elementFormDefault="qualified"&gt;

&lt;xsd:import namespace=<a class="moz-txt-link-rfc2396E"
href="http://www.w3.org/2001/XMLSchema">"http://www.w3.org/2001/XMLSchema"</a> schemaLocation="XMLSchema.xsd"/&gt;

&lt;xsd:complexType name="complexType"&gt;
&lt;xsd:sequence minOccurs="0" maxOccurs="unbounded"&gt;
&lt;xsd:choice&gt;
&lt;xsd:element ref="xsd:schema"/&gt;
&lt;/xsd:choice&gt;
&lt;/xsd:sequence&gt;
&lt;/xsd:complexType&gt;

&lt;/xsd:schema&gt;
</pre>
<pre wrap=""><hr size="4" width="90%">
&lt;?xml version='1.0' encoding='UTF-8'?&gt;
&lt;!-- XML Schema schema for XML Schemas: Part 1: Structures --&gt;
&lt;!-- Note this schema is NOT the normative structures schema. --&gt;

&lt;!-- The prose copy in the structures REC is the normative --&gt;

&lt;!-- version (which shouldn't differ from this one except for --&gt;

&lt;!-- this comment and entity expansions, but just in case --&gt;

&lt;!DOCTYPE xs:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "XMLSchema.dtd" [

&lt;!-- provide ID type information even for parsers which only read the
internal subset --&gt;
&lt;!ATTLIST xs:schema id ID #IMPLIED&gt;
&lt;!ATTLIST xs:complexType id ID #IMPLIED&gt;
&lt;!ATTLIST xs:complexContent id ID #IMPLIED&gt;
&lt;!ATTLIST xs:simpleContent id ID #IMPLIED&gt;
&lt;!ATTLIST xs:extension id ID #IMPLIED&gt;
&lt;!ATTLIST xs:element id ID #IMPLIED&gt;
&lt;!ATTLIST xs:group id ID #IMPLIED&gt;
&lt;!ATTLIST xs:all id ID #IMPLIED&gt;
&lt;!ATTLIST xs:choice id ID #IMPLIED&gt;
&lt;!ATTLIST xs:sequence id ID #IMPLIED&gt;
&lt;!ATTLIST xs:any id ID #IMPLIED&gt;
&lt;!ATTLIST xs:anyAttribute id ID #IMPLIED&gt;
&lt;!ATTLIST xs:attribute id ID #IMPLIED&gt;
&lt;!ATTLIST xs:attributeGroup id ID #IMPLIED&gt;
&lt;!ATTLIST xs:unique id ID #IMPLIED&gt;
&lt;!ATTLIST xs:key id ID #IMPLIED&gt;
&lt;!ATTLIST xs:keyref id ID #IMPLIED&gt;
&lt;!ATTLIST xs:selector id ID #IMPLIED&gt;
&lt;!ATTLIST xs:field id ID #IMPLIED&gt;
&lt;!ATTLIST xs:include id ID #IMPLIED&gt;
&lt;!ATTLIST xs:import id ID #IMPLIED&gt;
&lt;!ATTLIST xs:redefine id ID #IMPLIED&gt;
&lt;!ATTLIST xs:notation id ID #IMPLIED&gt;
&lt;!--
keep this schema XML1.0 DTD valid
--&gt;
&lt;!ENTITY % schemaAttrs 'xmlns:hfp CDATA #IMPLIED'&gt;

&lt;!ELEMENT hfp:hasFacet EMPTY&gt;
&lt;!ATTLIST hfp:hasFacet
name NMTOKEN #REQUIRED&gt;

&lt;!ELEMENT hfp:hasProperty EMPTY&gt;
&lt;!ATTLIST hfp:hasProperty
name NMTOKEN #REQUIRED
value CDATA #REQUIRED&gt;
&lt;!--
Make sure that processors that do not read the external
subset will know about the various IDs we declare
--&gt;
&lt;!ATTLIST xs:simpleType id ID #IMPLIED&gt;
&lt;!ATTLIST xs:maxExclusive id ID #IMPLIED&gt;
&lt;!ATTLIST xs:minExclusive id ID #IMPLIED&gt;
&lt;!ATTLIST xs:maxInclusive id ID #IMPLIED&gt;
&lt;!ATTLIST xs:minInclusive id ID #IMPLIED&gt;
&lt;!ATTLIST xs:totalDigits id ID #IMPLIED&gt;
&lt;!ATTLIST xs:fractionDigits id ID #IMPLIED&gt;
&lt;!ATTLIST xs:length id ID #IMPLIED&gt;
&lt;!ATTLIST xs:minLength id ID #IMPLIED&gt;
&lt;!ATTLIST xs:maxLength id ID #IMPLIED&gt;
&lt;!ATTLIST xs:enumeration id ID #IMPLIED&gt;
&lt;!ATTLIST xs:pattern id ID #IMPLIED&gt;
&lt;!ATTLIST xs:appinfo id ID #IMPLIED&gt;
&lt;!ATTLIST xs:documentation id ID #IMPLIED&gt;
&lt;!ATTLIST xs:list id ID #IMPLIED&gt;
&lt;!ATTLIST xs:union id ID #IMPLIED&gt;
]&gt;
&lt;xs:schema targetNamespace=<a class="moz-txt-link-rfc2396E"
href="http://www.w3.org/2001/XMLSchema">"http://www.w3.org/2001/XMLSchema"</a> blockDefault="#all" elementFormDefault="qualified" version="1.0" xmlns:xs=<a
class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema">"http://www.w3.org/2001/XMLSchema"</a><a
class="moz-txt-link-rfc2396E" href="xml:lang=">" xml:lang="</a>EN" xmlns:hfp=<a
class="moz-txt-link-rfc2396E"
href="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty">"http://www.w3.org/2001/XMLSchema-hasFacetAndProperty"</a>&gt;
&lt;xs:import namespace=<a class="moz-txt-link-rfc2396E"
href="http://www.w3.org/XML/1998/namespace">"http://www.w3.org/XML/1998/namespace"</a> schemaLocation=<a
class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/xml.xsd">"http://www.w3.org/2001/xml.xsd"</a>/&gt;

&lt;xs:element name="schema" id="schema"&gt;
&lt;xs:complexType&gt;
&lt;xs:sequence&gt;
&lt;xs:choice minOccurs="0" maxOccurs="unbounded"&gt;
&lt;xs:element name="include" type="xs:anyURI"/&gt;
&lt;/xs:choice&gt;
&lt;/xs:sequence&gt;
&lt;xs:attribute name="targetNamespace" type="xs:anyURI"/&gt;
&lt;xs:attribute name="version" type="xs:normalizedString"/&gt;
&lt;xs:attribute name="id" type="xs:ID"/&gt;
&lt;xs:attribute ref=<a class="moz-txt-link-rfc2396E"
href="xml:lang">"xml:lang"</a>/&gt;
&lt;/xs:complexType&gt;

&lt;xs:key name="element"&gt;
&lt;xs:selector xpath="xs:element"/&gt;
&lt;xs:field xpath="@name"/&gt;
&lt;/xs:key&gt;

&lt;xs:key name="attribute"&gt;
&lt;xs:selector xpath="xs:attribute"/&gt;
&lt;xs:field xpath="@name"/&gt;
&lt;/xs:key&gt;

&lt;xs:key name="type"&gt;
&lt;xs:selector xpath="xs:complexType|xs:simpleType"/&gt;
&lt;xs:field xpath="@name"/&gt;
&lt;/xs:key&gt;

&lt;xs:key name="group"&gt;
&lt;xs:selector xpath="xs:group"/&gt;
&lt;xs:field xpath="@name"/&gt;
&lt;/xs:key&gt;

&lt;xs:key name="attributeGroup"&gt;
&lt;xs:selector xpath="xs:attributeGroup"/&gt;
&lt;xs:field xpath="@name"/&gt;
&lt;/xs:key&gt;

&lt;xs:key name="notation"&gt;
&lt;xs:selector xpath="xs:notation"/&gt;
&lt;xs:field xpath="@name"/&gt;
&lt;/xs:key&gt;

&lt;xs:key name="identityConstraint"&gt;
&lt;xs:selector xpath=".//xs:key|.//xs:unique|.//xs:keyref"/&gt;
&lt;xs:field xpath="@name"/&gt;
&lt;/xs:key&gt;

&lt;/xs:element&gt;

&lt;/xs:schema&gt;
</pre>
</blockquote>
<br>
</blockquote>
</body>
</html>

--------------030303050502070205020500--
Re: Problem validating a reference to xsd:schema [message #594588 is a reply to message #58774] Wed, 23 March 2005 19:25 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 26137
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------000004020701000707010309
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Steve,

I could not reproduce your problem:

$ xsd-test.bat -validate ~/workspace/simple/schemas/embedded_schema.xsd
-->
file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/embedded_schema.xsd
-->
file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/XMLSchema.xsd
Error: URI
file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/XMLSchema.xsd
Line 78 Column 54
XSD: Type reference 'http://www.w3.org/2001/XMLSchema#anyURI' is
unresolved
Error: URI
file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/XMLSchema.xsd
Line 81 Column 20
XSD: Type reference 'http://www.w3.org/2001/XMLSchema#anyURI' is
unresolved
Error: URI
file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/XMLSchema.xsd
Line 82 Column 61
XSD: Type reference
'http://www.w3.org/2001/XMLSchema#normalizedString' is unresolved
Error: URI
file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/XMLSchema.xsd
Line 83 Column 63
XSD: Type reference 'http://www.w3.org/2001/XMLSchema#ID' is unresolved
--> http://www.w3.org/2001/xml.xsd



Steve Speicher wrote:

> Hi,
>
> I'm attempting to reference the global element "xsd:schema" within my
> schema. But the editor/validator is complaining and I don't know why.
>
> Here's my simple schema:
>
> <?xml version="1.0"?>
> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> elementFormDefault="qualified">
>
> <xsd:import namespace="http://www.w3.org/2001/XMLSchema"
> schemaLocation="XMLSchema.xsd"/>
>
> <xsd:complexType name="complexType">
> <xsd:sequence minOccurs="0" maxOccurs="unbounded">
> <xsd:choice>
> <xsd:element _ref="xsd:schema"_/>
> </xsd:choice>
> </xsd:sequence>
> </xsd:complexType>
>
> </xsd:schema>
>
> src-resolve: Cannot resolve the name 'xsd:schema' to a(n) element
> declaration component.
>
> What am I doing wrong? I've attached my schemas too.
>
> Thanks in advance,
> Steve Speicher
>
> ------------------------------------------------------------ ------------
>
><?xml version="1.0"?>
><xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
>
> <xsd:import namespace="http://www.w3.org/2001/XMLSchema" schemaLocation="XMLSchema.xsd"/>
>
> <xsd:complexType name="complexType">
> <xsd:sequence minOccurs="0" maxOccurs="unbounded">
> <xsd:choice>
> <xsd:element ref="xsd:schema"/>
> </xsd:choice>
> </xsd:sequence>
> </xsd:complexType>
>
></xsd:schema>
>
>
> ------------------------------------------------------------ ------------
>
><?xml version='1.0' encoding='UTF-8'?>
><!-- XML Schema schema for XML Schemas: Part 1: Structures -->
><!-- Note this schema is NOT the normative structures schema. -->
>
><!-- The prose copy in the structures REC is the normative -->
>
><!-- version (which shouldn't differ from this one except for -->
>
><!-- this comment and entity expansions, but just in case -->
>
><!DOCTYPE xs:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "XMLSchema.dtd" [
>
><!-- provide ID type information even for parsers which only read the
> internal subset -->
><!ATTLIST xs:schema id ID #IMPLIED>
><!ATTLIST xs:complexType id ID #IMPLIED>
><!ATTLIST xs:complexContent id ID #IMPLIED>
><!ATTLIST xs:simpleContent id ID #IMPLIED>
><!ATTLIST xs:extension id ID #IMPLIED>
><!ATTLIST xs:element id ID #IMPLIED>
><!ATTLIST xs:group id ID #IMPLIED>
><!ATTLIST xs:all id ID #IMPLIED>
><!ATTLIST xs:choice id ID #IMPLIED>
><!ATTLIST xs:sequence id ID #IMPLIED>
><!ATTLIST xs:any id ID #IMPLIED>
><!ATTLIST xs:anyAttribute id ID #IMPLIED>
><!ATTLIST xs:attribute id ID #IMPLIED>
><!ATTLIST xs:attributeGroup id ID #IMPLIED>
><!ATTLIST xs:unique id ID #IMPLIED>
><!ATTLIST xs:key id ID #IMPLIED>
><!ATTLIST xs:keyref id ID #IMPLIED>
><!ATTLIST xs:selector id ID #IMPLIED>
><!ATTLIST xs:field id ID #IMPLIED>
><!ATTLIST xs:include id ID #IMPLIED>
><!ATTLIST xs:import id ID #IMPLIED>
><!ATTLIST xs:redefine id ID #IMPLIED>
><!ATTLIST xs:notation id ID #IMPLIED>
><!--
> keep this schema XML1.0 DTD valid
> -->
> <!ENTITY % schemaAttrs 'xmlns:hfp CDATA #IMPLIED'>
>
> <!ELEMENT hfp:hasFacet EMPTY>
> <!ATTLIST hfp:hasFacet
> name NMTOKEN #REQUIRED>
>
> <!ELEMENT hfp:hasProperty EMPTY>
> <!ATTLIST hfp:hasProperty
> name NMTOKEN #REQUIRED
> value CDATA #REQUIRED>
><!--
> Make sure that processors that do not read the external
> subset will know about the various IDs we declare
> -->
> <!ATTLIST xs:simpleType id ID #IMPLIED>
> <!ATTLIST xs:maxExclusive id ID #IMPLIED>
> <!ATTLIST xs:minExclusive id ID #IMPLIED>
> <!ATTLIST xs:maxInclusive id ID #IMPLIED>
> <!ATTLIST xs:minInclusive id ID #IMPLIED>
> <!ATTLIST xs:totalDigits id ID #IMPLIED>
> <!ATTLIST xs:fractionDigits id ID #IMPLIED>
> <!ATTLIST xs:length id ID #IMPLIED>
> <!ATTLIST xs:minLength id ID #IMPLIED>
> <!ATTLIST xs:maxLength id ID #IMPLIED>
> <!ATTLIST xs:enumeration id ID #IMPLIED>
> <!ATTLIST xs:pattern id ID #IMPLIED>
> <!ATTLIST xs:appinfo id ID #IMPLIED>
> <!ATTLIST xs:documentation id ID #IMPLIED>
> <!ATTLIST xs:list id ID #IMPLIED>
> <!ATTLIST xs:union id ID #IMPLIED>
> ]>
><xs:schema targetNamespace="http://www.w3.org/2001/XMLSchema" blockDefault="#all" elementFormDefault="qualified" version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" xml:lang="EN" xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty">
> <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
>
> <xs:element name="schema" id="schema">
> <xs:complexType>
> <xs:sequence>
> <xs:choice minOccurs="0" maxOccurs="unbounded">
> <xs:element name="include" type="xs:anyURI"/>
> </xs:choice>
> </xs:sequence>
> <xs:attribute name="targetNamespace" type="xs:anyURI"/>
> <xs:attribute name="version" type="xs:normalizedString"/>
> <xs:attribute name="id" type="xs:ID"/>
> <xs:attribute ref="xml:lang"/>
> </xs:complexType>
>
> <xs:key name="element">
> <xs:selector xpath="xs:element"/>
> <xs:field xpath="@name"/>
> </xs:key>
>
> <xs:key name="attribute">
> <xs:selector xpath="xs:attribute"/>
> <xs:field xpath="@name"/>
> </xs:key>
>
> <xs:key name="type">
> <xs:selector xpath="xs:complexType|xs:simpleType"/>
> <xs:field xpath="@name"/>
> </xs:key>
>
> <xs:key name="group">
> <xs:selector xpath="xs:group"/>
> <xs:field xpath="@name"/>
> </xs:key>
>
> <xs:key name="attributeGroup">
> <xs:selector xpath="xs:attributeGroup"/>
> <xs:field xpath="@name"/>
> </xs:key>
>
> <xs:key name="notation">
> <xs:selector xpath="xs:notation"/>
> <xs:field xpath="@name"/>
> </xs:key>
>
> <xs:key name="identityConstraint">
> <xs:selector xpath=".//xs:key|.//xs:unique|.//xs:keyref"/>
> <xs:field xpath="@name"/>
> </xs:key>
>
> </xs:element>
>
></xs:schema>
>
>


--------------000004020701000707010309
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Steve,<br>
<br>
I could not reproduce your problem:<br>
<blockquote>$ xsd-test.bat -validate
~/workspace/simple/schemas/embedded_schema.xsd<br>
--&gt;
<a class="moz-txt-link-freetext" href=" file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/embedded_schema.xsd "> file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/embedded_schema.xsd </a><br>
--&gt;
<a class="moz-txt-link-freetext" href=" file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/XMLSchema.xsd "> file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/XMLSchema.xsd </a><br>
Error: URI
<a class="moz-txt-link-freetext" href=" file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/XMLSchema.xsd "> file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/XMLSchema.xsd </a>
Line 78 Column 54<br>
XSD: Type reference '<a class="moz-txt-link-freetext" href="http://www.w3.org/2001/XMLSchema#anyURI">http://www.w3.org/2001/XMLSchema#anyURI</a>' is
unresolved<br>
Error: URI
<a class="moz-txt-link-freetext" href=" file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/XMLSchema.xsd "> file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/XMLSchema.xsd </a>
Line 81 Column 20<br>
XSD: Type reference '<a class="moz-txt-link-freetext" href="http://www.w3.org/2001/XMLSchema#anyURI">http://www.w3.org/2001/XMLSchema#anyURI</a>' is
unresolved<br>
Error: URI
<a class="moz-txt-link-freetext" href=" file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/XMLSchema.xsd "> file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/XMLSchema.xsd </a>
Line 82 Column 61<br>
XSD: Type reference '<a class="moz-txt-link-freetext" href="http://www.w3.org/2001/XMLSchema#normalizedString">http://www.w3.org/2001/XMLSchema#normalizedString</a>'
is unresolved<br>
Error: URI
<a class="moz-txt-link-freetext" href=" file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/XMLSchema.xsd "> file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/XMLSchema.xsd </a>
Line 83 Column 63<br>
XSD: Type reference '<a class="moz-txt-link-freetext" href="http://www.w3.org/2001/XMLSchema#ID">http://www.w3.org/2001/XMLSchema#ID</a>' is unresolved<br>
--&gt; <a class="moz-txt-link-freetext" href="http://www.w3.org/2001/xml.xsd">http://www.w3.org/2001/xml.xsd</a><br>
</blockquote>
<br>
<br>
Steve Speicher wrote:
<blockquote cite="midd1shqn$15b$1@news.eclipse.org" type="cite">
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
Hi,<br>
<br>
I'm attempting to reference the global element "xsd:schema" within my
schema.&nbsp; But the editor/validator is complaining and I don't know why.<br>
<br>
Here's my simple schema:<br>
<br>
<blockquote><tt>&lt;?xml version="1.0"?&gt;<br>
&lt;xsd:schema xmlns:xsd=<a class="moz-txt-link-rfc2396E"
href="http://www.w3.org/2001/XMLSchema">"http://www.w3.org/2001/XMLSchema"</a>
elementFormDefault="qualified"&gt;<br>
<br>
&nbsp;&nbsp;&nbsp; &lt;xsd:import namespace=<a class="moz-txt-link-rfc2396E"
href="http://www.w3.org/2001/XMLSchema">"http://www.w3.org/2001/XMLSchema"</a>
schemaLocation="XMLSchema.xsd"/&gt;<br>
<br>
&nbsp;&nbsp;&nbsp; &lt;xsd:complexType name="complexType"&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;xsd:sequence minOccurs="0" maxOccurs="unbounded"&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;xsd:choice&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;xsd:element <font color="#ff0000"><u>ref="xsd:schema"</u></font>/&gt; <br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/xsd:choice&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/xsd:sequence&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;/xsd:complexType&gt;<br>
<br>
&lt;/xsd:schema&gt;</tt><br>
</blockquote>
src-resolve: <font color="#ff0000">Cannot resolve the name
'xsd:schema' to a(n) element declaration component.<br>
<br>
<font color="#000000">What am I doing wrong?&nbsp; I've attached my
schemas
too.<br>
<br>
Thanks in advance,<br>
Steve Speicher<br>
</font></font>
<pre wrap="">
<hr size="4" width="90%">
&lt;?xml version="1.0"?&gt;
&lt;xsd:schema xmlns:xsd=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema">"http://www.w3.org/2001/XMLSchema"</a> elementFormDefault="qualified"&gt;

&lt;xsd:import namespace=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema">"http://www.w3.org/2001/XMLSchema"</a> schemaLocation="XMLSchema.xsd"/&gt;

&lt;xsd:complexType name="complexType"&gt;
&lt;xsd:sequence minOccurs="0" maxOccurs="unbounded"&gt;
&lt;xsd:choice&gt;
&lt;xsd:element ref="xsd:schema"/&gt;
&lt;/xsd:choice&gt;
&lt;/xsd:sequence&gt;
&lt;/xsd:complexType&gt;

&lt;/xsd:schema&gt;
</pre>
<pre wrap="">
<hr size="4" width="90%">
&lt;?xml version='1.0' encoding='UTF-8'?&gt;
&lt;!-- XML Schema schema for XML Schemas: Part 1: Structures --&gt;
&lt;!-- Note this schema is NOT the normative structures schema. --&gt;

&lt;!-- The prose copy in the structures REC is the normative --&gt;

&lt;!-- version (which shouldn't differ from this one except for --&gt;

&lt;!-- this comment and entity expansions, but just in case --&gt;

&lt;!DOCTYPE xs:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "XMLSchema.dtd" [

&lt;!-- provide ID type information even for parsers which only read the
internal subset --&gt;
&lt;!ATTLIST xs:schema id ID #IMPLIED&gt;
&lt;!ATTLIST xs:complexType id ID #IMPLIED&gt;
&lt;!ATTLIST xs:complexContent id ID #IMPLIED&gt;
&lt;!ATTLIST xs:simpleContent id ID #IMPLIED&gt;
&lt;!ATTLIST xs:extension id ID #IMPLIED&gt;
&lt;!ATTLIST xs:element id ID #IMPLIED&gt;
&lt;!ATTLIST xs:group id ID #IMPLIED&gt;
&lt;!ATTLIST xs:all id ID #IMPLIED&gt;
&lt;!ATTLIST xs:choice id ID #IMPLIED&gt;
&lt;!ATTLIST xs:sequence id ID #IMPLIED&gt;
&lt;!ATTLIST xs:any id ID #IMPLIED&gt;
&lt;!ATTLIST xs:anyAttribute id ID #IMPLIED&gt;
&lt;!ATTLIST xs:attribute id ID #IMPLIED&gt;
&lt;!ATTLIST xs:attributeGroup id ID #IMPLIED&gt;
&lt;!ATTLIST xs:unique id ID #IMPLIED&gt;
&lt;!ATTLIST xs:key id ID #IMPLIED&gt;
&lt;!ATTLIST xs:keyref id ID #IMPLIED&gt;
&lt;!ATTLIST xs:selector id ID #IMPLIED&gt;
&lt;!ATTLIST xs:field id ID #IMPLIED&gt;
&lt;!ATTLIST xs:include id ID #IMPLIED&gt;
&lt;!ATTLIST xs:import id ID #IMPLIED&gt;
&lt;!ATTLIST xs:redefine id ID #IMPLIED&gt;
&lt;!ATTLIST xs:notation id ID #IMPLIED&gt;
&lt;!--
keep this schema XML1.0 DTD valid
--&gt;
&lt;!ENTITY % schemaAttrs 'xmlns:hfp CDATA #IMPLIED'&gt;

&lt;!ELEMENT hfp:hasFacet EMPTY&gt;
&lt;!ATTLIST hfp:hasFacet
name NMTOKEN #REQUIRED&gt;

&lt;!ELEMENT hfp:hasProperty EMPTY&gt;
&lt;!ATTLIST hfp:hasProperty
name NMTOKEN #REQUIRED
value CDATA #REQUIRED&gt;
&lt;!--
Make sure that processors that do not read the external
subset will know about the various IDs we declare
--&gt;
&lt;!ATTLIST xs:simpleType id ID #IMPLIED&gt;
&lt;!ATTLIST xs:maxExclusive id ID #IMPLIED&gt;
&lt;!ATTLIST xs:minExclusive id ID #IMPLIED&gt;
&lt;!ATTLIST xs:maxInclusive id ID #IMPLIED&gt;
&lt;!ATTLIST xs:minInclusive id ID #IMPLIED&gt;
&lt;!ATTLIST xs:totalDigits id ID #IMPLIED&gt;
&lt;!ATTLIST xs:fractionDigits id ID #IMPLIED&gt;
&lt;!ATTLIST xs:length id ID #IMPLIED&gt;
&lt;!ATTLIST xs:minLength id ID #IMPLIED&gt;
&lt;!ATTLIST xs:maxLength id ID #IMPLIED&gt;
&lt;!ATTLIST xs:enumeration id ID #IMPLIED&gt;
&lt;!ATTLIST xs:pattern id ID #IMPLIED&gt;
&lt;!ATTLIST xs:appinfo id ID #IMPLIED&gt;
&lt;!ATTLIST xs:documentation id ID #IMPLIED&gt;
&lt;!ATTLIST xs:list id ID #IMPLIED&gt;
&lt;!ATTLIST xs:union id ID #IMPLIED&gt;
]&gt;
&lt;xs:schema targetNamespace=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema">"http://www.w3.org/2001/XMLSchema"</a> blockDefault="#all" elementFormDefault="qualified" version="1.0" xmlns:xs=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema">"http://www.w3.org/2001/XMLSchema"</a<a class="moz-txt-link-rfc2396E" href="xml:lang=">" xml:lang="</a>EN" xmlns:hfp=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty">"http://www.w3.org/2001/XMLSchema-hasFacetAndProperty"</a>&gt;
&lt;xs:import namespace=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/XML/1998/namespace">"http://www.w3.org/XML/1998/namespace"</a> schemaLocation=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/xml.xsd">"http://www.w3.org/2001/xml.xsd"</a>/&gt;

&lt;xs:element name="schema" id="schema"&gt;
&lt;xs:complexType&gt;
&lt;xs:sequence&gt;
&lt;xs:choice minOccurs="0" maxOccurs="unbounded"&gt;
&lt;xs:element name="include" type="xs:anyURI"/&gt;
&lt;/xs:choice&gt;
&lt;/xs:sequence&gt;
&lt;xs:attribute name="targetNamespace" type="xs:anyURI"/&gt;
&lt;xs:attribute name="version" type="xs:normalizedString"/&gt;
&lt;xs:attribute name="id" type="xs:ID"/&gt;
&lt;xs:attribute ref=<a class="moz-txt-link-rfc2396E" href="xml:lang">"xml:lang"</a>/&gt;
&lt;/xs:complexType&gt;

&lt;xs:key name="element"&gt;
&lt;xs:selector xpath="xs:element"/&gt;
&lt;xs:field xpath="@name"/&gt;
&lt;/xs:key&gt;

&lt;xs:key name="attribute"&gt;
&lt;xs:selector xpath="xs:attribute"/&gt;
&lt;xs:field xpath="@name"/&gt;
&lt;/xs:key&gt;

&lt;xs:key name="type"&gt;
&lt;xs:selector xpath="xs:complexType|xs:simpleType"/&gt;
&lt;xs:field xpath="@name"/&gt;
&lt;/xs:key&gt;

&lt;xs:key name="group"&gt;
&lt;xs:selector xpath="xs:group"/&gt;
&lt;xs:field xpath="@name"/&gt;
&lt;/xs:key&gt;

&lt;xs:key name="attributeGroup"&gt;
&lt;xs:selector xpath="xs:attributeGroup"/&gt;
&lt;xs:field xpath="@name"/&gt;
&lt;/xs:key&gt;

&lt;xs:key name="notation"&gt;
&lt;xs:selector xpath="xs:notation"/&gt;
&lt;xs:field xpath="@name"/&gt;
&lt;/xs:key&gt;

&lt;xs:key name="identityConstraint"&gt;
&lt;xs:selector xpath=".//xs:key|.//xs:unique|.//xs:keyref"/&gt;
&lt;xs:field xpath="@name"/&gt;
&lt;/xs:key&gt;

&lt;/xs:element&gt;

&lt;/xs:schema&gt;
</pre>
</blockquote>
<br>
</body>
</html>

--------------000004020701000707010309--
Re: Problem validating a reference to xsd:schema [message #594597 is a reply to message #58802] Wed, 23 March 2005 19:40 Go to previous message
Steve Speicher is currently offline Steve Speicher
Messages: 85
Registered: July 2009
Member

This is a multi-part message in MIME format.
--------------030303050502070205020500
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Ed,

I wrongly included the "shortened" version of XMLSchema.xsd. Anyway,
without having done anything (other than restarting Eclipse a couple
times)...it appears to be fine.

Perhaps it is just an autonomic schema.

- Steve

Ed Merks wrote:

> Steve,
>
> I could not reproduce your problem:
>
> $ xsd-test.bat -validate
> ~/workspace/simple/schemas/embedded_schema.xsd
> -->
> file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/embedded_schema.xsd
> -->
> file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/XMLSchema.xsd
> Error: URI
> file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/XMLSchema.xsd
> Line 78 Column 54
> XSD: Type reference 'http://www.w3.org/2001/XMLSchema#anyURI' is
> unresolved
> Error: URI
> file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/XMLSchema.xsd
> Line 81 Column 20
> XSD: Type reference 'http://www.w3.org/2001/XMLSchema#anyURI' is
> unresolved
> Error: URI
> file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/XMLSchema.xsd
> Line 82 Column 61
> XSD: Type reference
> 'http://www.w3.org/2001/XMLSchema#normalizedString' is unresolved
> Error: URI
> file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/XMLSchema.xsd
> Line 83 Column 63
> XSD: Type reference 'http://www.w3.org/2001/XMLSchema#ID' is
> unresolved
> --> http://www.w3.org/2001/xml.xsd
>
>
>
> Steve Speicher wrote:
>
>> Hi,
>>
>> I'm attempting to reference the global element "xsd:schema" within my
>> schema. But the editor/validator is complaining and I don't know why.
>>
>> Here's my simple schema:
>>
>> <?xml version="1.0"?>
>> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>> elementFormDefault="qualified">
>>
>> <xsd:import namespace="http://www.w3.org/2001/XMLSchema"
>> schemaLocation="XMLSchema.xsd"/>
>>
>> <xsd:complexType name="complexType">
>> <xsd:sequence minOccurs="0" maxOccurs="unbounded">
>> <xsd:choice>
>> <xsd:element _ref="xsd:schema"_/>
>> </xsd:choice>
>> </xsd:sequence>
>> </xsd:complexType>
>>
>> </xsd:schema>
>>
>> src-resolve: Cannot resolve the name 'xsd:schema' to a(n) element
>> declaration component.
>>
>> What am I doing wrong? I've attached my schemas too.
>>
>> Thanks in advance,
>> Steve Speicher
>>
>> ------------------------------------------------------------ ------------
>>
>><?xml version="1.0"?>
>><xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
>>
>> <xsd:import namespace="http://www.w3.org/2001/XMLSchema" schemaLocation="XMLSchema.xsd"/>
>>
>> <xsd:complexType name="complexType">
>> <xsd:sequence minOccurs="0" maxOccurs="unbounded">
>> <xsd:choice>
>> <xsd:element ref="xsd:schema"/>
>> </xsd:choice>
>> </xsd:sequence>
>> </xsd:complexType>
>>
>></xsd:schema>
>>
>>
>> ------------------------------------------------------------ ------------
>>
>><?xml version='1.0' encoding='UTF-8'?>
>><!-- XML Schema schema for XML Schemas: Part 1: Structures -->
>><!-- Note this schema is NOT the normative structures schema. -->
>>
>><!-- The prose copy in the structures REC is the normative -->
>>
>><!-- version (which shouldn't differ from this one except for -->
>>
>><!-- this comment and entity expansions, but just in case -->
>>
>><!DOCTYPE xs:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "XMLSchema.dtd" [
>>
>><!-- provide ID type information even for parsers which only read the
>> internal subset -->
>><!ATTLIST xs:schema id ID #IMPLIED>
>><!ATTLIST xs:complexType id ID #IMPLIED>
>><!ATTLIST xs:complexContent id ID #IMPLIED>
>><!ATTLIST xs:simpleContent id ID #IMPLIED>
>><!ATTLIST xs:extension id ID #IMPLIED>
>><!ATTLIST xs:element id ID #IMPLIED>
>><!ATTLIST xs:group id ID #IMPLIED>
>><!ATTLIST xs:all id ID #IMPLIED>
>><!ATTLIST xs:choice id ID #IMPLIED>
>><!ATTLIST xs:sequence id ID #IMPLIED>
>><!ATTLIST xs:any id ID #IMPLIED>
>><!ATTLIST xs:anyAttribute id ID #IMPLIED>
>><!ATTLIST xs:attribute id ID #IMPLIED>
>><!ATTLIST xs:attributeGroup id ID #IMPLIED>
>><!ATTLIST xs:unique id ID #IMPLIED>
>><!ATTLIST xs:key id ID #IMPLIED>
>><!ATTLIST xs:keyref id ID #IMPLIED>
>><!ATTLIST xs:selector id ID #IMPLIED>
>><!ATTLIST xs:field id ID #IMPLIED>
>><!ATTLIST xs:include id ID #IMPLIED>
>><!ATTLIST xs:import id ID #IMPLIED>
>><!ATTLIST xs:redefine id ID #IMPLIED>
>><!ATTLIST xs:notation id ID #IMPLIED>
>><!--
>> keep this schema XML1.0 DTD valid
>> -->
>> <!ENTITY % schemaAttrs 'xmlns:hfp CDATA #IMPLIED'>
>>
>> <!ELEMENT hfp:hasFacet EMPTY>
>> <!ATTLIST hfp:hasFacet
>> name NMTOKEN #REQUIRED>
>>
>> <!ELEMENT hfp:hasProperty EMPTY>
>> <!ATTLIST hfp:hasProperty
>> name NMTOKEN #REQUIRED
>> value CDATA #REQUIRED>
>><!--
>> Make sure that processors that do not read the external
>> subset will know about the various IDs we declare
>> -->
>> <!ATTLIST xs:simpleType id ID #IMPLIED>
>> <!ATTLIST xs:maxExclusive id ID #IMPLIED>
>> <!ATTLIST xs:minExclusive id ID #IMPLIED>
>> <!ATTLIST xs:maxInclusive id ID #IMPLIED>
>> <!ATTLIST xs:minInclusive id ID #IMPLIED>
>> <!ATTLIST xs:totalDigits id ID #IMPLIED>
>> <!ATTLIST xs:fractionDigits id ID #IMPLIED>
>> <!ATTLIST xs:length id ID #IMPLIED>
>> <!ATTLIST xs:minLength id ID #IMPLIED>
>> <!ATTLIST xs:maxLength id ID #IMPLIED>
>> <!ATTLIST xs:enumeration id ID #IMPLIED>
>> <!ATTLIST xs:pattern id ID #IMPLIED>
>> <!ATTLIST xs:appinfo id ID #IMPLIED>
>> <!ATTLIST xs:documentation id ID #IMPLIED>
>> <!ATTLIST xs:list id ID #IMPLIED>
>> <!ATTLIST xs:union id ID #IMPLIED>
>> ]>
>><xs:schema targetNamespace="http://www.w3.org/2001/XMLSchema" blockDefault="#all" elementFormDefault="qualified" version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema"" xml:lang="EN" xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty">
>> <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
>>
>> <xs:element name="schema" id="schema">
>> <xs:complexType>
>> <xs:sequence>
>> <xs:choice minOccurs="0" maxOccurs="unbounded">
>> <xs:element name="include" type="xs:anyURI"/>
>> </xs:choice>
>> </xs:sequence>
>> <xs:attribute name="targetNamespace" type="xs:anyURI"/>
>> <xs:attribute name="version" type="xs:normalizedString"/>
>> <xs:attribute name="id" type="xs:ID"/>
>> <xs:attribute ref="xml:lang"/>
>> </xs:complexType>
>>
>> <xs:key name="element">
>> <xs:selector xpath="xs:element"/>
>> <xs:field xpath="@name"/>
>> </xs:key>
>>
>> <xs:key name="attribute">
>> <xs:selector xpath="xs:attribute"/>
>> <xs:field xpath="@name"/>
>> </xs:key>
>>
>> <xs:key name="type">
>> <xs:selector xpath="xs:complexType|xs:simpleType"/>
>> <xs:field xpath="@name"/>
>> </xs:key>
>>
>> <xs:key name="group">
>> <xs:selector xpath="xs:group"/>
>> <xs:field xpath="@name"/>
>> </xs:key>
>>
>> <xs:key name="attributeGroup">
>> <xs:selector xpath="xs:attributeGroup"/>
>> <xs:field xpath="@name"/>
>> </xs:key>
>>
>> <xs:key name="notation">
>> <xs:selector xpath="xs:notation"/>
>> <xs:field xpath="@name"/>
>> </xs:key>
>>
>> <xs:key name="identityConstraint">
>> <xs:selector xpath=".//xs:key|.//xs:unique|.//xs:keyref"/>
>> <xs:field xpath="@name"/>
>> </xs:key>
>>
>> </xs:element>
>>
>></xs:schema>
>>
>>
>

--------------030303050502070205020500
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Ed,<br>
<br>
I wrongly included the "shortened" version of XMLSchema.xsd.&nbsp; Anyway,
without having done anything (other than restarting Eclipse a couple
times)...it appears to be fine.<br>
<br>
Perhaps it is just an autonomic schema.<br>
<br>
- Steve<br>
<br>
Ed Merks wrote:
<blockquote cite="midd1skks$4om$1@news.eclipse.org" type="cite">
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
Steve,<br>
<br>
I could not reproduce your problem:<br>
<blockquote>$ xsd-test.bat -validate
~/workspace/simple/schemas/embedded_schema.xsd<br>
--&gt;
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href=" file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/embedded_schema.xsd "> file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/embedded_schema.xsd </a><br>
--&gt;
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href=" file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/XMLSchema.xsd "> file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/XMLSchema.xsd </a><br>
Error: URI
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href=" file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/XMLSchema.xsd "> file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/XMLSchema.xsd </a>
Line 78 Column 54<br>
XSD: Type reference '<a class="moz-txt-link-freetext"
href="http://www.w3.org/2001/XMLSchema#anyURI">http://www.w3.org/2001/XMLSchema#anyURI</a>'
is
unresolved<br>
Error: URI
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href=" file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/XMLSchema.xsd "> file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/XMLSchema.xsd </a>
Line 81 Column 20<br>
XSD: Type reference '<a class="moz-txt-link-freetext"
href="http://www.w3.org/2001/XMLSchema#anyURI">http://www.w3.org/2001/XMLSchema#anyURI</a>'
is
unresolved<br>
Error: URI
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href=" file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/XMLSchema.xsd "> file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/XMLSchema.xsd </a>
Line 82 Column 61<br>
XSD: Type reference '<a class="moz-txt-link-freetext"
href="http://www.w3.org/2001/XMLSchema#normalizedString">http://www.w3.org/2001/XMLSchema#normalizedString</a>'
is unresolved<br>
Error: URI
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href=" file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/XMLSchema.xsd "> file:/D:/sandbox/unpackage1_3.1M5a/eclipse/workspace/simple/ schemas/XMLSchema.xsd </a>
Line 83 Column 63<br>
XSD: Type reference '<a class="moz-txt-link-freetext"
href="http://www.w3.org/2001/XMLSchema#ID">http://www.w3.org/2001/XMLSchema#ID</a>'
is unresolved<br>
--&gt; <a class="moz-txt-link-freetext"
href="http://www.w3.org/2001/xml.xsd">http://www.w3.org/2001/xml.xsd</a><br>
</blockquote>
<br>
<br>
Steve Speicher wrote:
<blockquote cite="midd1shqn$15b$1@news.eclipse.org" type="cite">
<meta content="text/html;charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
Hi,<br>
<br>
I'm attempting to reference the global element "xsd:schema" within my
schema.&nbsp; But the editor/validator is complaining and I don't know why.<br>
<br>
Here's my simple schema:<br>
<br>
<blockquote><tt>&lt;?xml version="1.0"?&gt;<br>
&lt;xsd:schema xmlns:xsd=<a class="moz-txt-link-rfc2396E"
href="http://www.w3.org/2001/XMLSchema">"http://www.w3.org/2001/XMLSchema"</a>
elementFormDefault="qualified"&gt;<br>
<br>
&nbsp;&nbsp;&nbsp; &lt;xsd:import namespace=<a class="moz-txt-link-rfc2396E"
href="http://www.w3.org/2001/XMLSchema">"http://www.w3.org/2001/XMLSchema"</a>
schemaLocation="XMLSchema.xsd"/&gt;<br>
<br>
&nbsp;&nbsp;&nbsp; &lt;xsd:complexType name="complexType"&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;xsd:sequence minOccurs="0" maxOccurs="unbounded"&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;xsd:choice&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;xsd:element <font color="#ff0000"><u>ref="xsd:schema"</u></font>/&gt; <br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/xsd:choice&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/xsd:sequence&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;/xsd:complexType&gt;<br>
<br>
&lt;/xsd:schema&gt;</tt><br>
</blockquote>
src-resolve: <font color="#ff0000">Cannot resolve the name
'xsd:schema' to a(n) element declaration component.<br>
<br>
<font color="#000000">What am I doing wrong?&nbsp; I've attached my
schemas
too.<br>
<br>
Thanks in advance,<br>
Steve Speicher<br>
</font></font>
<pre wrap=""><hr size="4" width="90%">
&lt;?xml version="1.0"?&gt;
&lt;xsd:schema xmlns:xsd=<a class="moz-txt-link-rfc2396E"
href="http://www.w3.org/2001/XMLSchema">"http://www.w3.org/2001/XMLSchema"</a> elementFormDefault="qualified"&gt;

&lt;xsd:import namespace=<a class="moz-txt-link-rfc2396E"
href="http://www.w3.org/2001/XMLSchema">"http://www.w3.org/2001/XMLSchema"</a> schemaLocation="XMLSchema.xsd"/&gt;

&lt;xsd:complexType name="complexType"&gt;
&lt;xsd:sequence minOccurs="0" maxOccurs="unbounded"&gt;
&lt;xsd:choice&gt;
&lt;xsd:element ref="xsd:schema"/&gt;
&lt;/xsd:choice&gt;
&lt;/xsd:sequence&gt;
&lt;/xsd:complexType&gt;

&lt;/xsd:schema&gt;
</pre>
<pre wrap=""><hr size="4" width="90%">
&lt;?xml version='1.0' encoding='UTF-8'?&gt;
&lt;!-- XML Schema schema for XML Schemas: Part 1: Structures --&gt;
&lt;!-- Note this schema is NOT the normative structures schema. --&gt;

&lt;!-- The prose copy in the structures REC is the normative --&gt;

&lt;!-- version (which shouldn't differ from this one except for --&gt;

&lt;!-- this comment and entity expansions, but just in case --&gt;

&lt;!DOCTYPE xs:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "XMLSchema.dtd" [

&lt;!-- provide ID type information even for parsers which only read the
internal subset --&gt;
&lt;!ATTLIST xs:schema id ID #IMPLIED&gt;
&lt;!ATTLIST xs:complexType id ID #IMPLIED&gt;
&lt;!ATTLIST xs:complexContent id ID #IMPLIED&gt;
&lt;!ATTLIST xs:simpleContent id ID #IMPLIED&gt;
&lt;!ATTLIST xs:extension id ID #IMPLIED&gt;
&lt;!ATTLIST xs:element id ID #IMPLIED&gt;
&lt;!ATTLIST xs:group id ID #IMPLIED&gt;
&lt;!ATTLIST xs:all id ID #IMPLIED&gt;
&lt;!ATTLIST xs:choice id ID #IMPLIED&gt;
&lt;!ATTLIST xs:sequence id ID #IMPLIED&gt;
&lt;!ATTLIST xs:any id ID #IMPLIED&gt;
&lt;!ATTLIST xs:anyAttribute id ID #IMPLIED&gt;
&lt;!ATTLIST xs:attribute id ID #IMPLIED&gt;
&lt;!ATTLIST xs:attributeGroup id ID #IMPLIED&gt;
&lt;!ATTLIST xs:unique id ID #IMPLIED&gt;
&lt;!ATTLIST xs:key id ID #IMPLIED&gt;
&lt;!ATTLIST xs:keyref id ID #IMPLIED&gt;
&lt;!ATTLIST xs:selector id ID #IMPLIED&gt;
&lt;!ATTLIST xs:field id ID #IMPLIED&gt;
&lt;!ATTLIST xs:include id ID #IMPLIED&gt;
&lt;!ATTLIST xs:import id ID #IMPLIED&gt;
&lt;!ATTLIST xs:redefine id ID #IMPLIED&gt;
&lt;!ATTLIST xs:notation id ID #IMPLIED&gt;
&lt;!--
keep this schema XML1.0 DTD valid
--&gt;
&lt;!ENTITY % schemaAttrs 'xmlns:hfp CDATA #IMPLIED'&gt;

&lt;!ELEMENT hfp:hasFacet EMPTY&gt;
&lt;!ATTLIST hfp:hasFacet
name NMTOKEN #REQUIRED&gt;

&lt;!ELEMENT hfp:hasProperty EMPTY&gt;
&lt;!ATTLIST hfp:hasProperty
name NMTOKEN #REQUIRED
value CDATA #REQUIRED&gt;
&lt;!--
Make sure that processors that do not read the external
subset will know about the various IDs we declare
--&gt;
&lt;!ATTLIST xs:simpleType id ID #IMPLIED&gt;
&lt;!ATTLIST xs:maxExclusive id ID #IMPLIED&gt;
&lt;!ATTLIST xs:minExclusive id ID #IMPLIED&gt;
&lt;!ATTLIST xs:maxInclusive id ID #IMPLIED&gt;
&lt;!ATTLIST xs:minInclusive id ID #IMPLIED&gt;
&lt;!ATTLIST xs:totalDigits id ID #IMPLIED&gt;
&lt;!ATTLIST xs:fractionDigits id ID #IMPLIED&gt;
&lt;!ATTLIST xs:length id ID #IMPLIED&gt;
&lt;!ATTLIST xs:minLength id ID #IMPLIED&gt;
&lt;!ATTLIST xs:maxLength id ID #IMPLIED&gt;
&lt;!ATTLIST xs:enumeration id ID #IMPLIED&gt;
&lt;!ATTLIST xs:pattern id ID #IMPLIED&gt;
&lt;!ATTLIST xs:appinfo id ID #IMPLIED&gt;
&lt;!ATTLIST xs:documentation id ID #IMPLIED&gt;
&lt;!ATTLIST xs:list id ID #IMPLIED&gt;
&lt;!ATTLIST xs:union id ID #IMPLIED&gt;
]&gt;
&lt;xs:schema targetNamespace=<a class="moz-txt-link-rfc2396E"
href="http://www.w3.org/2001/XMLSchema">"http://www.w3.org/2001/XMLSchema"</a> blockDefault="#all" elementFormDefault="qualified" version="1.0" xmlns:xs=<a
class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema">"http://www.w3.org/2001/XMLSchema"</a><a
class="moz-txt-link-rfc2396E" href="xml:lang=">" xml:lang="</a>EN" xmlns:hfp=<a
class="moz-txt-link-rfc2396E"
href="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty">"http://www.w3.org/2001/XMLSchema-hasFacetAndProperty"</a>&gt;
&lt;xs:import namespace=<a class="moz-txt-link-rfc2396E"
href="http://www.w3.org/XML/1998/namespace">"http://www.w3.org/XML/1998/namespace"</a> schemaLocation=<a
class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/xml.xsd">"http://www.w3.org/2001/xml.xsd"</a>/&gt;

&lt;xs:element name="schema" id="schema"&gt;
&lt;xs:complexType&gt;
&lt;xs:sequence&gt;
&lt;xs:choice minOccurs="0" maxOccurs="unbounded"&gt;
&lt;xs:element name="include" type="xs:anyURI"/&gt;
&lt;/xs:choice&gt;
&lt;/xs:sequence&gt;
&lt;xs:attribute name="targetNamespace" type="xs:anyURI"/&gt;
&lt;xs:attribute name="version" type="xs:normalizedString"/&gt;
&lt;xs:attribute name="id" type="xs:ID"/&gt;
&lt;xs:attribute ref=<a class="moz-txt-link-rfc2396E"
href="xml:lang">"xml:lang"</a>/&gt;
&lt;/xs:complexType&gt;

&lt;xs:key name="element"&gt;
&lt;xs:selector xpath="xs:element"/&gt;
&lt;xs:field xpath="@name"/&gt;
&lt;/xs:key&gt;

&lt;xs:key name="attribute"&gt;
&lt;xs:selector xpath="xs:attribute"/&gt;
&lt;xs:field xpath="@name"/&gt;
&lt;/xs:key&gt;

&lt;xs:key name="type"&gt;
&lt;xs:selector xpath="xs:complexType|xs:simpleType"/&gt;
&lt;xs:field xpath="@name"/&gt;
&lt;/xs:key&gt;

&lt;xs:key name="group"&gt;
&lt;xs:selector xpath="xs:group"/&gt;
&lt;xs:field xpath="@name"/&gt;
&lt;/xs:key&gt;

&lt;xs:key name="attributeGroup"&gt;
&lt;xs:selector xpath="xs:attributeGroup"/&gt;
&lt;xs:field xpath="@name"/&gt;
&lt;/xs:key&gt;

&lt;xs:key name="notation"&gt;
&lt;xs:selector xpath="xs:notation"/&gt;
&lt;xs:field xpath="@name"/&gt;
&lt;/xs:key&gt;

&lt;xs:key name="identityConstraint"&gt;
&lt;xs:selector xpath=".//xs:key|.//xs:unique|.//xs:keyref"/&gt;
&lt;xs:field xpath="@name"/&gt;
&lt;/xs:key&gt;

&lt;/xs:element&gt;

&lt;/xs:schema&gt;
</pre>
</blockquote>
<br>
</blockquote>
</body>
</html>

--------------030303050502070205020500--
Previous Topic:Problem validating a reference to xsd:schema
Next Topic:Problems when referencing an included attribute group with anyAttribute
Goto Forum:
  


Current Time: Thu Oct 23 09:22:34 GMT 2014

Powered by FUDForum. Page generated in 0.05831 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software