Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Schema element name selectable, attributes not

Reply
Thread Tools

Schema element name selectable, attributes not

 
 
Alex Sab
Guest
Posts: n/a
 
      04-05-2004
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
 
Reply With Quote
 
 
 
 
Martin Honnen
Guest
Posts: n/a
 
      04-05-2004


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/

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
obtain element name, or attribute and value of the document name itself, and some elemnts and attributes from an ancestor or the node itself using xquery Jeff Kish XML 4 10-30-2008 05:47 PM
web.xml / XML schema issue, why do some XML schema attributes disappear asciz@starmail.com Java 3 02-20-2007 09:56 AM
Including element from one schema namespace in another schema namespace mflll@wiu.edu XML 1 07-20-2006 06:48 AM
[XML Schema] Including a schema document with absent target namespace to a schema with specified target namespace Stanimir Stamenkov XML 3 04-25-2005 09:59 AM
XML Schema: disjunctive attributes for element possible ? Gehirnloser Zombie XML 2 01-13-2004 07:35 PM



Advertisments