473,396 Members | 1,975 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,396 software developers and data experts.

Schema Design for common global element

I have target xml to generate from schema. All of the XML instances
have the same global element i.e. <base>. I would like to combine all
of the schemas into a single schema where I could generate any of the
specific instances.

sample schema one:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<xs:element name="base">
<xs:complexType>
<xs:attribute name="myNodeABC" type="xs:string"/>
<xs:attribute name="myNodeDEF" type="xs:string"/>
</xs:complexType>
</xs:element>
</xs:schema>

sample schema two:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<xs:element name="base">
<xs:complexType>
<xs:attribute name="myNodeABC" type="xs:string"/>
<xs:attribute name="myNodeXYZ" type="xs:string"/>
</xs:complexType>
</xs:element>
</xs:schema>

Can anyone suggest how to join these two into a single schema where
the instance document does not have namespace prefixed
elements/attributes?

I tried attributeGroups, groups, import and include elements, without
any luck.

Any help is appreciated.

Thanks,
Gordon
Jul 20 '05 #1
4 2361
Hi Gordon

Had a similar problem and it took me ages to sort something out (just
writing a dissertation about DTD vs Schema use..)

This is what worked for me, but I am not an expert so my solution
might not be how it should be done...

Sample Schema 1 (file: untitled8.xsd):

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:in="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<xs:import namespace="http://www.w3.org/2001/XMLSchema"
schemaLocation="untitled9.xsd"></xs:import>
<xs:element name="base">
<xs:complexType>
<xs:sequence>
<xs:element ref="in:base"></xs:element>
</xs:sequence>
<xs:attribute name="myNodeABC"></xs:attribute>
<xs:attribute name="myNodeDEF"></xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>
which is your main Schema, note the <xs:import> tag, which references
the location of your "to be imported" element (here in the same
directory so just referenced "untitled9.xsd"). Also note above the
<xs:import> - tag a new xmlns namespace abbreviation is introduced
ie... xmlns:in - this is because I have given your second Schema a new
namespace prefix (in)...:

Sample Schema 2: This is the "to be imported" schema (my doc called
untitled9.xsd - referenced in Schema 1 in the <xs:import> tag) with
the new namespace prefix in:

<?xml version="1.0" encoding="UTF-8"?>
<in:schema xmlns:in="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<in:element name="base">
<in:complexType>
<in:attribute name="myNodeABC" type="in:string"/>
<in:attribute name="myNodeXYZ" type="in:string"/>
</in:complexType>
</in:element>
</in:schema>

The resulting XML instance document:

<?xml version="1.0" encoding="UTF-8"?>
<base xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="file:untitled8.xsd"
myNodeABC="" myNodeDEF="">
<base xmlns="http://www.w3.org/2001/XMLSchema"
myNodeABC="" myNodeXYZ="">Content of base element of Schema 2
nested in the base element of Schema 1 </base>
</base>

By the way, I used the oXygen XML editor for this, for some reason
Altova's XML Spy does not like my new namespace prefix... but oXygen
validates it all..

Again, this might be complete gibberish but I hope it helps..

Cheers
Ingrid

PS let me know what you think of it anyway, might be helpful for my
dissertation to know if I am thinking on the right lines..And if you
find an easier way to do it, could you please post it??

gd******@ciber.com (Gordon Dickens) wrote in message news:<87*************************@posting.google.c om>...
I have target xml to generate from schema. All of the XML instances
have the same global element i.e. <base>. I would like to combine all
of the schemas into a single schema where I could generate any of the
specific instances.

sample schema one:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<xs:element name="base">
<xs:complexType>
<xs:attribute name="myNodeABC" type="xs:string"/>
<xs:attribute name="myNodeDEF" type="xs:string"/>
</xs:complexType>
</xs:element>
</xs:schema>

sample schema two:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<xs:element name="base">
<xs:complexType>
<xs:attribute name="myNodeABC" type="xs:string"/>
<xs:attribute name="myNodeXYZ" type="xs:string"/>
</xs:complexType>
</xs:element>
</xs:schema>

Can anyone suggest how to join these two into a single schema where
the instance document does not have namespace prefixed
elements/attributes?

I tried attributeGroups, groups, import and include elements, without
any luck.

Any help is appreciated.

Thanks,
Gordon

Jul 20 '05 #2
Re my answer below...

Even better than that: SCHEMA 1 (Untitled8.xsd):

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:in="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" targetNamespace="http://Untitled8">
<xs:import namespace="http://Untitled9/in"
schemaLocation="untitled9.xsd"></xs:import>
<xs:element name="base">
<xs:complexType>
<xs:sequence>
<in:element name="base">
<in:complexType>
<in:attribute name="myNodeABC" type="in:string"/>
<in:attribute name="myNodeXYZ" type="in:string"/>
</in:complexType></in:element>
</xs:sequence>
<xs:attribute name="myNodeABC"></xs:attribute>
<xs:attribute name="myNodeDEF"></xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>
SCHEMA 2 (Untitled9.xsd):

<?xml version="1.0" encoding="UTF-8"?>
<in:schema xmlns:in="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://Untitled9/in"
elementFormDefault="qualified">
<in:element name="base">
<in:complexType>
<in:attribute name="myNodeABC" type="in:string"/>
<in:attribute name="myNodeXYZ" type="in:string"/>
</in:complexType>
</in:element>
</in:schema>

Resulting XML doc:

<?xml version="1.0" encoding="UTF-8"?>
<base xmlns="http://Untitled8"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://Untitled8
file:/C:/Documents%20and%20Settings/Ingrid/Desktop/Untitled8.xsd"
myNodeABC="" myNodeDEF="">
<base myNodeABC="" myNodeXYZ="">SCHEMA 2 content </base>
</base>

Ingrid

So the solution below is probably not strictly speaking the correct
way...
i.*******@ucl.ac.uk (Ingrid) wrote in message news:<f0*************************@posting.google.c om>...
Hi Gordon

Had a similar problem and it took me ages to sort something out (just
writing a dissertation about DTD vs Schema use..)

This is what worked for me, but I am not an expert so my solution
might not be how it should be done...

Sample Schema 1 (file: untitled8.xsd):

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:in="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<xs:import namespace="http://www.w3.org/2001/XMLSchema"
schemaLocation="untitled9.xsd"></xs:import>
<xs:element name="base">
<xs:complexType>
<xs:sequence>
<xs:element ref="in:base"></xs:element>
</xs:sequence>
<xs:attribute name="myNodeABC"></xs:attribute>
<xs:attribute name="myNodeDEF"></xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>
which is your main Schema, note the <xs:import> tag, which references
the location of your "to be imported" element (here in the same
directory so just referenced "untitled9.xsd"). Also note above the
<xs:import> - tag a new xmlns namespace abbreviation is introduced
ie... xmlns:in - this is because I have given your second Schema a new
namespace prefix (in)...:

Sample Schema 2: This is the "to be imported" schema (my doc called
untitled9.xsd - referenced in Schema 1 in the <xs:import> tag) with
the new namespace prefix in:

<?xml version="1.0" encoding="UTF-8"?>
<in:schema xmlns:in="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<in:element name="base">
<in:complexType>
<in:attribute name="myNodeABC" type="in:string"/>
<in:attribute name="myNodeXYZ" type="in:string"/>
</in:complexType>
</in:element>
</in:schema>

The resulting XML instance document:

<?xml version="1.0" encoding="UTF-8"?>
<base xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="file:untitled8.xsd"
myNodeABC="" myNodeDEF="">
<base xmlns="http://www.w3.org/2001/XMLSchema"
myNodeABC="" myNodeXYZ="">Content of base element of Schema 2
nested in the base element of Schema 1 </base>
</base>

By the way, I used the oXygen XML editor for this, for some reason
Altova's XML Spy does not like my new namespace prefix... but oXygen
validates it all..

Again, this might be complete gibberish but I hope it helps..

Cheers
Ingrid

PS let me know what you think of it anyway, might be helpful for my
dissertation to know if I am thinking on the right lines..And if you
find an easier way to do it, could you please post it??

gd******@ciber.com (Gordon Dickens) wrote in message news:<87*************************@posting.google.c om>...
I have target xml to generate from schema. All of the XML instances
have the same global element i.e. <base>. I would like to combine all
of the schemas into a single schema where I could generate any of the
specific instances.

sample schema one:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<xs:element name="base">
<xs:complexType>
<xs:attribute name="myNodeABC" type="xs:string"/>
<xs:attribute name="myNodeDEF" type="xs:string"/>
</xs:complexType>
</xs:element>
</xs:schema>

sample schema two:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<xs:element name="base">
<xs:complexType>
<xs:attribute name="myNodeABC" type="xs:string"/>
<xs:attribute name="myNodeXYZ" type="xs:string"/>
</xs:complexType>
</xs:element>
</xs:schema>

Can anyone suggest how to join these two into a single schema where
the instance document does not have namespace prefixed
elements/attributes?

I tried attributeGroups, groups, import and include elements, without
any luck.

Any help is appreciated.

Thanks,
Gordon

Jul 20 '05 #3
************************************************** ***********
i.*******@ucl.ac.uk (Ingrid) wrote in message news:<f0*************************@posting.google.c om>...
Re my answer below...

Even better than that: SCHEMA 1 (Untitled8.xsd):

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:in="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" targetNamespace="http://Untitled8">
<-- <xs:import namespace="http://Untitled9/in"
schemaLocation="untitled9.xsd"></xs:import>-->
<xs:element name="base">
<xs:complexType>
<xs:sequence>
<in:element name="base">
<in:complexType>
<in:attribute name="myNodeABC" type="in:string"/>
<in:attribute name="myNodeXYZ" type="in:string"/>
</in:complexType></in:element>
</xs:sequence>
<xs:attribute name="myNodeABC"></xs:attribute>
<xs:attribute name="myNodeDEF"></xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>
SCHEMA 2 (Untitled9.xsd):

<?xml version="1.0" encoding="UTF-8"?>
<in:schema xmlns:in="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://Untitled9/in"
elementFormDefault="qualified">
<in:element name="base">
<in:complexType>
<in:attribute name="myNodeABC" type="in:string"/>
<in:attribute name="myNodeXYZ" type="in:string"/>
</in:complexType>
</in:element>
</in:schema>

Resulting XML doc:

<?xml version="1.0" encoding="UTF-8"?>
<base xmlns="http://Untitled8"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://Untitled8
file:/C:/Documents%20and%20Settings/Ingrid/Desktop/Untitled8.xsd"
myNodeABC="" myNodeDEF="">
<base myNodeABC="" myNodeXYZ="">SCHEMA 2 content </base>
</base>

Ingrid

So the solution below is probably not strictly speaking the correct
way...
i.*******@ucl.ac.uk (Ingrid) wrote in message news:<f0*************************@posting.google.c om>...
Hi Gordon

Had a similar problem and it took me ages to sort something out (just
writing a dissertation about DTD vs Schema use..)

This is what worked for me, but I am not an expert so my solution
might not be how it should be done...

Sample Schema 1 (file: untitled8.xsd):

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:in="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<xs:import namespace="http://www.w3.org/2001/XMLSchema"
schemaLocation="untitled9.xsd"></xs:import>
<xs:element name="base">
<xs:complexType>
<xs:sequence>
<xs:element ref="in:base"></xs:element>
</xs:sequence>
<xs:attribute name="myNodeABC"></xs:attribute>
<xs:attribute name="myNodeDEF"></xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>
which is your main Schema, note the <xs:import> tag, which references
the location of your "to be imported" element (here in the same
directory so just referenced "untitled9.xsd"). Also note above the
<xs:import> - tag a new xmlns namespace abbreviation is introduced
ie... xmlns:in - this is because I have given your second Schema a new
namespace prefix (in)...:

Sample Schema 2: This is the "to be imported" schema (my doc called
untitled9.xsd - referenced in Schema 1 in the <xs:import> tag) with
the new namespace prefix in:

<?xml version="1.0" encoding="UTF-8"?>
<in:schema xmlns:in="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<in:element name="base">
<in:complexType>
<in:attribute name="myNodeABC" type="in:string"/>
<in:attribute name="myNodeXYZ" type="in:string"/>
</in:complexType>
</in:element>
</in:schema>

The resulting XML instance document:

<?xml version="1.0" encoding="UTF-8"?>
<base xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="file:untitled8.xsd"
myNodeABC="" myNodeDEF="">
<base xmlns="http://www.w3.org/2001/XMLSchema"
myNodeABC="" myNodeXYZ="">Content of base element of Schema 2
nested in the base element of Schema 1 </base>
</base>

By the way, I used the oXygen XML editor for this, for some reason
Altova's XML Spy does not like my new namespace prefix... but oXygen
validates it all..

Again, this might be complete gibberish but I hope it helps..

Cheers
Ingrid

PS let me know what you think of it anyway, might be helpful for my
dissertation to know if I am thinking on the right lines..And if you
find an easier way to do it, could you please post it??

gd******@ciber.com (Gordon Dickens) wrote in message news:<87*************************@posting.google.c om>...
I have target xml to generate from schema. All of the XML instances
have the same global element i.e. <base>. I would like to combine all
of the schemas into a single schema where I could generate any of the
specific instances.

sample schema one:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<xs:element name="base">
<xs:complexType>
<xs:attribute name="myNodeABC" type="xs:string"/>
<xs:attribute name="myNodeDEF" type="xs:string"/>
</xs:complexType>
</xs:element>
</xs:schema>

sample schema two:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<xs:element name="base">
<xs:complexType>
<xs:attribute name="myNodeABC" type="xs:string"/>
<xs:attribute name="myNodeXYZ" type="xs:string"/>
</xs:complexType>
</xs:element>
</xs:schema>

Can anyone suggest how to join these two into a single schema where
the instance document does not have namespace prefixed
elements/attributes?

I tried attributeGroups, groups, import and include elements, without
any luck.

Any help is appreciated.

Thanks,
Gordon

Jul 20 '05 #4
Thank you everyone for your help. Here is what I needed to do (a lot
simpler than I thought)... just add "targetNamespace" to the
definition for each XML schema document with a unique value.

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="http://Untitled8/in"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<xs:element name="base">
<xs:complexType>
<xs:attribute name="myNodeABC" type="xs:string"/>
<xs:attribute name="myNodeXYZ" type="xs:string"/>
</xs:complexType>
</xs:element>
</xs:schema>

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="http://Untitled9/in"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<xs:element name="base">
<xs:complexType>
<xs:attribute name="myNodeABC" type="xs:string"/>
<xs:attribute name="myNodeXYZ" type="xs:string"/>
</xs:complexType>
</xs:element>
</xs:schema>

Thanks again.

Regards,
Gordon Dickens
------------------------------------------------------------------------
i.*******@ucl.ac.uk (Ingrid) wrote in message news:<f0*************************@posting.google.c om>...
************************************************** ***********
i.*******@ucl.ac.uk (Ingrid) wrote in message news:<f0*************************@posting.google.c om>...
Re my answer below...

Even better than that: SCHEMA 1 (Untitled8.xsd):

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:in="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" targetNamespace="http://Untitled8">
<-- <xs:import namespace="http://Untitled9/in"
schemaLocation="untitled9.xsd"></xs:import>-->
<xs:element name="base">
<xs:complexType>
<xs:sequence>
<in:element name="base">
<in:complexType>
<in:attribute name="myNodeABC" type="in:string"/>
<in:attribute name="myNodeXYZ" type="in:string"/>
</in:complexType></in:element>
</xs:sequence>
<xs:attribute name="myNodeABC"></xs:attribute>
<xs:attribute name="myNodeDEF"></xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>
SCHEMA 2 (Untitled9.xsd):

<?xml version="1.0" encoding="UTF-8"?>
<in:schema xmlns:in="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://Untitled9/in"
elementFormDefault="qualified">
<in:element name="base">
<in:complexType>
<in:attribute name="myNodeABC" type="in:string"/>
<in:attribute name="myNodeXYZ" type="in:string"/>
</in:complexType>
</in:element>
</in:schema>

Resulting XML doc:

<?xml version="1.0" encoding="UTF-8"?>
<base xmlns="http://Untitled8"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://Untitled8
file:/C:/Documents%20and%20Settings/Ingrid/Desktop/Untitled8.xsd"
myNodeABC="" myNodeDEF="">
<base myNodeABC="" myNodeXYZ="">SCHEMA 2 content </base>
</base>

Ingrid

So the solution below is probably not strictly speaking the correct
way...
i.*******@ucl.ac.uk (Ingrid) wrote in message news:<f0*************************@posting.google.c om>...
Hi Gordon

Had a similar problem and it took me ages to sort something out (just
writing a dissertation about DTD vs Schema use..)

This is what worked for me, but I am not an expert so my solution
might not be how it should be done...

Sample Schema 1 (file: untitled8.xsd):

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:in="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<xs:import namespace="http://www.w3.org/2001/XMLSchema"
schemaLocation="untitled9.xsd"></xs:import>
<xs:element name="base">
<xs:complexType>
<xs:sequence>
<xs:element ref="in:base"></xs:element>
</xs:sequence>
<xs:attribute name="myNodeABC"></xs:attribute>
<xs:attribute name="myNodeDEF"></xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>
which is your main Schema, note the <xs:import> tag, which references
the location of your "to be imported" element (here in the same
directory so just referenced "untitled9.xsd"). Also note above the
<xs:import> - tag a new xmlns namespace abbreviation is introduced
ie... xmlns:in - this is because I have given your second Schema a new
namespace prefix (in)...:

Sample Schema 2: This is the "to be imported" schema (my doc called
untitled9.xsd - referenced in Schema 1 in the <xs:import> tag) with
the new namespace prefix in:

<?xml version="1.0" encoding="UTF-8"?>
<in:schema xmlns:in="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<in:element name="base">
<in:complexType>
<in:attribute name="myNodeABC" type="in:string"/>
<in:attribute name="myNodeXYZ" type="in:string"/>
</in:complexType>
</in:element>
</in:schema>

The resulting XML instance document:

<?xml version="1.0" encoding="UTF-8"?>
<base xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="file:untitled8.xsd"
myNodeABC="" myNodeDEF="">
<base xmlns="http://www.w3.org/2001/XMLSchema"
myNodeABC="" myNodeXYZ="">Content of base element of Schema 2
nested in the base element of Schema 1 </base>
</base>

By the way, I used the oXygen XML editor for this, for some reason
Altova's XML Spy does not like my new namespace prefix... but oXygen
validates it all..

Again, this might be complete gibberish but I hope it helps..

Cheers
Ingrid

PS let me know what you think of it anyway, might be helpful for my
dissertation to know if I am thinking on the right lines..And if you
find an easier way to do it, could you please post it??

gd******@ciber.com (Gordon Dickens) wrote in message news:<87*************************@posting.google.c om>...
> I have target xml to generate from schema. All of the XML instances
> have the same global element i.e. <base>. I would like to combine all
> of the schemas into a single schema where I could generate any of the
> specific instances.
>
> sample schema one:
> <?xml version="1.0" encoding="UTF-8"?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
> elementFormDefault="qualified">
> <xs:element name="base">
> <xs:complexType>
> <xs:attribute name="myNodeABC" type="xs:string"/>
> <xs:attribute name="myNodeDEF" type="xs:string"/>
> </xs:complexType>
> </xs:element>
> </xs:schema>
>
> sample schema two:
> <?xml version="1.0" encoding="UTF-8"?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
> elementFormDefault="qualified">
> <xs:element name="base">
> <xs:complexType>
> <xs:attribute name="myNodeABC" type="xs:string"/>
> <xs:attribute name="myNodeXYZ" type="xs:string"/>
> </xs:complexType>
> </xs:element>
> </xs:schema>
>
> Can anyone suggest how to join these two into a single schema where
> the instance document does not have namespace prefixed
> elements/attributes?
>
> I tried attributeGroups, groups, import and include elements, without
> any luck.
>
> Any help is appreciated.
>
> Thanks,
> Gordon

Jul 20 '05 #5

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

Similar topics

3
by: Kanchana D S | last post by:
Hi, I am trying to design the schema for an XML file. The approach that I am planning to follow is to have 2 XSD files, each containing some relevant information about the elements in the...
3
by: Cy Huckaba | last post by:
I have been looking around for a sample on how to read an XSD schema and iterate through the elements to display them. I am working in VB.Net and I have looked at all of the docs on msdn and can...
1
by: Jeff S | last post by:
Hello all, I'm trying to design a schema from which I can generate a typed dataset class. I'm having problems incorporating choice and enumerations in the schema and getting the xml results...
2
by: Tarren | last post by:
Hi: The problem I am having is when I validate an xml file to a schema, it is erroring out every element. I think this has something to do with me defining/referencing the namespaces. I have...
0
by: Chuck Bowling | last post by:
I have an XML Schema that's similar to the abbreviated version below; my problem is that both the XML designer in VS 2002 and xsd.exe apparently ignore the heirarchy that the Schema defines. In the...
5
by: Grant Robertson | last post by:
I am only just learning about schema basics. I am trying to understand some fundamental principles about what can be specified within a schema. If I define an enumerated list of values for an...
3
by: Eric Lilja | last post by:
Hello again, I'm having a new problem converting a dtd to an xml schema. This once is a little bit more complicated than in my previous question. The following file validates correctly: <?xml...
6
by: Grant Robertson | last post by:
If I use the 'any' element in my schema to allow elements from another schema to be used in instance documents based on my schema, is there a way to force that the contents of that element must be...
0
by: rautsmita | last post by:
hello friends , i am using to jdk6 and JAXB2.0, i have geomtry.xsd file i am trying to compile this file using jaxb but i got some error i.e.The particle of the type is not a valid restriction of...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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,...
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.