473,404 Members | 2,137 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

problem with <restriction>

Greetings.

Below is the schema snippet I am trying to explore attributegroups and attribute's use property. However I am getting a validation error saying "undefined value for base encountered", pointing to <xs:restriction>. Please help.

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema elementFormDefault="qualified" attributeFormDefault="unqualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:attributeGroup name="grp">
<xs:attribute name="x" type="xs:string"/>
<xs:attribute name="y" type="xs:string"/>
<xs:attribute name="z" type="xs:string"/>
</xs:attributeGroup>
<xs:complexType name="A">
<xs:complexContent>
<xs:restriction base="xs:grp">
<xs:attribute name="x" use="required"/>
<xs:attribute name="y" use="prohibited"/>
<xs:attribute name="z" use="required"/>
</xs:restriction>
</xs:complexContent>
</xs:complexType>
</xs:schema>

************************************************** ********************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
Nov 12 '05 #1
1 1153
The attributeGroup does not belong to the xs namespace, rather than
targetnamespace of the schema (which is no namespace in this case). Just
remove the xs prefix in the reference to the attribute group and it should
work:
<xs:restriction base="grp">

"Mahalakshmi Natarajan" <ma***********@yahoo.co.uk> wrote in message
news:el*************@TK2MSFTNGP11.phx.gbl... Greetings.

Below is the schema snippet I am trying to explore attributegroups and attribute's use property. However I am getting a validation error saying
"undefined value for base encountered", pointing to <xs:restriction>. Please
help.
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema elementFormDefault="qualified" attributeFormDefault="unqualified"
xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:attributeGroup name="grp">
<xs:attribute name="x" type="xs:string"/>
<xs:attribute name="y" type="xs:string"/>
<xs:attribute name="z" type="xs:string"/>
</xs:attributeGroup>
<xs:complexType name="A">
<xs:complexContent>
<xs:restriction base="xs:grp">
<xs:attribute name="x" use="required"/>
<xs:attribute name="y" use="prohibited"/>
<xs:attribute name="z" use="required"/>
</xs:restriction>
</xs:complexContent>
</xs:complexType>
</xs:schema>

************************************************** ********************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP &

ASP.NET resources...
Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Markus Seibold | last post by:
Hello NG, sorry for pasting that much code but I just can't figure out how get the <key><keyref> to work in XML Schema. I am using XMLSpy 4.3 for editing my XML. I want to represent a...
1
by: Vijay | last post by:
<xs:element name="product"> <xs:complexType> <xs:complexContent> <xs:restriction base="xs:integer"> <xs:attribute name="prodid" type="xs:positiveInteger"/> </xs:restriction>...
3
by: Matt | last post by:
If I do the following, the browse text box still cannot see C:/hello world/test.txt. <input type="file" name="fileName" value="C:/hello world/test.txt" size=80> I realize we couldn't set the...
2
by: Ian Griffiths | last post by:
I have been given a schema, instances of which I'm required to be able to consume and generate. I'd like to be able to manipulate these instances as DataSets internally in my application. The...
5
by: Gerhard Menzl | last post by:
Has anyone ever tried to sort a Standard Library container of gcroots? I have run into the problem that somewhere deep in the Library logic (in line 338 of <memory>, to be precise) the destructor...
2
by: yqlu | last post by:
I hava developed a client in C# that is connected to a 3-party XML Web Services developed in Java based on the AXIS 1.1. Most methods call are successful except for one method named "findObjects"...
0
by: malahal | last post by:
I am planning to write a very simple python script that displays files based on user input. E.g. I need to display f1.msg file if the user presses <F1key, f2.msg file if the user presses <F2key. ...
1
by: Kevin Burton | last post by:
I have a set of XSD's that I would like to build some classes from. When I run the xsd tool I get a warning that the following is not "legal": <xsd:restriction base="xsd:string"> I have seen...
36
by: Roedy Green | last post by:
The only browser I have encountered that supports <colgroup><col class="behold"></colgroup> to apply a CSS style to a whole column, is Microsoft Internet Explorer. I have been told it SHOULD NOT...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.