473,612 Members | 2,321 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

xml schema: limitations on <redefine>?

Am I right in thinking that...

1) in <redefine> I can either extend OR restrict a type but not both?

2) in <redefine> it's not possible to change a type from say
<xs:string> to <xs:integer>?

3) if I have schema1.xsd with

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefa ult="qualified"
targetNamespace ="http://www.cs.man.ac.u k/cnc/schema/gcf"
xmlns="http://www.cs.man.ac.u k/cnc/schema/gcf"
attributeFormDe fault="unqualif ied">
<xs:complexTy pe name="pname">
<xs:sequence>
<xs:element name="first" type="xs:intege r" />
<xs:element name="last" type="xs:string " />
</xs:sequence>
</xs:complexType>
<xs:element name="customer" type="pname" />
</xs:schema>

and then schema2.xsd redefines 'pname' viz:

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefa ult="qualified"
targetNamespace ="http://www.cs.man.ac.u k/cnc/schema/gcf"
xmlns="http://www.cs.man.ac.u k/cnc/schema/gcf"
attributeFormDe fault="unqualif ied">

<xs:redefine schemaLocation= "redefined.xsd" >
<xs:complexTy pe name="pname">
<xs:complexCont ent>
<xs:extension base="pname">
<xs:sequence>
<xs:element name="country" />
</xs:sequence>
</xs:extension>
</xs:complexConte nt>
</xs:complexType>
</xs:redefine>

<xs:element name="author" type="pname" />
</xs:schema>

am I right in thinking that type 'pname' then has three child
elements, 'first', 'last' and 'country'? and therefore that 'author'
has these 3 fields? In which case, why does XMLspy (version 4.4) only
show 'author' with the original 2 fields? Is there a free equilavent
to XMLspy (particularly for graphical representation of schema)?

Many thanks!
Michael Bane
http://www.cs.man.ac.uk/~bane
Jul 20 '05 #1
0 1681

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

Similar topics

30
3882
by: Toni Mcintyre | last post by:
i'm having 2 problems with the http://validator.w3.org 1. if i have: <meta http-equiv="Content-Script-Type" content="text/javascript"> then why do i need <script type=text/javascript> everywhere??? i'm writing most of my code by hand, so this is a lot of extra typing or global search and replace later 2. the other problem is with my include files: i usually <script src="foo.js"></script>
21
10205
by: Headless | last post by:
I've marked up song lyrics with the <pre> tag because it seems the most appropriate type of markup for the type of data. This results in inefficient use of horizontal space due to UA's default rendering of <pre> in a fixed width font. To change that I'd have to specify a proportional font family, thereby falling into the size pitfall that is associated with any sort of author specified font family: a) If I specify a sans serif font...
0
1475
by: pillbug | last post by:
I am trying to convince the Greta regular expression library to use the following char_traits: struct ignore_case_traits : std::char_traits<char> { static bool eq (const char& x, const char& y) { return tolower (x) == tolower (y); } static bool lt (const char& x, const char& y) { return tolower (x) < tolower (y); }
7
1855
by: gener672 | last post by:
Problem: font-size seems to be rendered differently for <li class="issue"> and for <p class="issue">. (Example is in: www.dvmvac.com/snippet/ ... ignore background - I just did a quick file copy and didn't get bkgnd file resolved.) In external CSS, I define 'body' to have a font-size of 10px .... and 'h2' to be 300%(which works - see header) .... then I define (or redefine) 'p' to be 120%. Inline (testing there before exporting to css...
2
2816
by: PengYu.UT | last post by:
Hi, In FFTW (http://www.fftw.org/), it defines the funciton fftw_malloc to allocate memory properly aligned. However, I only want to use new to allocate memory for std::complex<double>. Can some body show me how to redefine the new operator for an class already defined in the library? Thanks,
232
13234
by: robert maas, see http://tinyurl.com/uh3t | last post by:
I'm working on examples of programming in several languages, all (except PHP) running under CGI so that I can show both the source files and the actually running of the examples online. The first set of examples, after decoding the HTML FORM contents, merely verifies the text within a field to make sure it is a valid representation of an integer, without any junk thrown in, i.e. it must satisfy the regular expression: ^ *?+ *$ If the...
2
5845
by: ERingmae | last post by:
Hi, The environment is .NET 2.0, the language is C# and the problem is reading XSD file with xs:redefine section correctly to a XMLDataDocument.DataSet. What I am trying to do: I am trying to create a DataSet object from an XSD file by using XMLDataDocument class.
4
1719
by: shapper | last post by:
Hello, Is it possible to define the color of an a tag when it is disabled? <a disabled="disabled" class="PageNavigation"> &lt; </a> Thanks, Miguel
1
2447
by: Steph | last post by:
hello, how can i redefine the "<MethodName>Response" and "<MethodName>Result" .... in the soap response ! "<MethodName>Response" = ResponseElementName "<MethodName>Result" = ? thanks
0
8617
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8568
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8254
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8422
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5537
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4047
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2555
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1699
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1416
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.