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

Schema element name selectable, attributes not

Hi,
I have a XML structure where the element name can be chosen freely but
the element attributes must be all of the same names.

<Node>
<AnyName1 Type="Single" Unit="" Comment="">0</AnyName1>
<AnyName2 Type="Single" Unit="" Comment="">0</AnyName2>
<AnyName3 Type="Single" Unit="" Comment="">0</AnyName3>
<AnyName4 Type="Single" Unit="" Comment="">0</AnyName4>
<AnyName5 Type="Single" Unit="" Comment="">0</AnyName5>
<AnyName6 Type="Single" Unit="" Comment="">0</AnyName6>
</Node>

Is is possible to make a schema that works for any element name? The
schema should not know about AnyName1, AnyName2, ...

Regards,
Alex
Jul 20 '05 #1
1 1375


Alex Sab wrote:
I have a XML structure where the element name can be chosen freely but
the element attributes must be all of the same names.

<Node>
<AnyName1 Type="Single" Unit="" Comment="">0</AnyName1>
<AnyName2 Type="Single" Unit="" Comment="">0</AnyName2>
<AnyName3 Type="Single" Unit="" Comment="">0</AnyName3>
<AnyName4 Type="Single" Unit="" Comment="">0</AnyName4>
<AnyName5 Type="Single" Unit="" Comment="">0</AnyName5>
<AnyName6 Type="Single" Unit="" Comment="">0</AnyName6>
</Node>

Is is possible to make a schema that works for any element name? The
schema should not know about AnyName1, AnyName2, ...


You can use
<xs:any />
to specify that an element with any name can occur but I don't think you
can then restrict the attributes that element can have.
--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #2

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

Similar topics

0
by: C. M. Sperberg-McQueen | last post by:
wooks (wookiz@hotmail.com) wrote: > <?xml version='1.0'?> > <userlogin xmlns="urn:faster:userlogin" > xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'> > <login>mick</login> > ...
4
by: Gordon Dickens | last post by:
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...
2
by: M Rao | last post by:
I have xml data coming in as a stream from a web service running against exchange server.The attributes for the elements dtstart and dtend, b:dt="dateTime.tz"...
3
by: Mark | last post by:
Hi I am encoutering a problem during the validation of an XML document when using 'XmlValidingReader'. My setup is as follows. I have a schema 'Document.xsd' which is imported into a...
2
by: Shailendra Batham | last post by:
Hello Gurus, I want to put some restrictions on my attribute tag in my XML Schema, anyone out there have any idea how to do that. here is my XML and the XML Schema <?xml version="1.0"...
6
by: Martin | last post by:
Hi, I have a xml file like the one below <?xml version="1.0" encoding="utf-8"?><e1 xmlns:e1="http://tempuri.org/Source1.xsd" e1:att1="1" e1:att2="2" e1:rest="345"/> If I try to create a...
1
by: Mikus Sleiners | last post by:
I have a task to create xml document from c# code. I have example of that document should look like and also a xml schema. I wonder if i can use this xml schema somehow ? This is schema: ...
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: mk189 | last post by:
Hi, I am trying to create XML schema of custom markup language, enriched by XHTML. In simplified version, the XML documet could look like that: <a:alarm-manual xmlns:a="alarm-manual"...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.