Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


anonymous element

From: "Kassahun, Ayalew" <Ayalew.Kassahun@---.-->
To: <xmlschema-dev@--.--->
Date: 12/1/2006 11:19:00 AM
Hi;

 

How can I define anonymous elements (elements without names) in XML
schema?

 

What I would like to achieve is a schema in which the following
statements are true:

1.       An XML document based on the schema can contain any XML
element.

2.       All XML elements should have "id" and "name" attributes. 

 

In short something like this:

 

<xsd:schema targetNamespace="http://www.bla"
xmlns:xsd=http://www.w3.org/2001/XMLSchema>

    <!-- anonymous element  -->

    <xsd:complexType name="Anonymous.Type">

        <xsd:attribute name="id" type="xsd:string"/>

        <xsd:attribute name="name" type="xsd:string"/>

    </xsd:complexType>

 

     <xsd:element name="*" type=" Anonymous.Type"/>

</xsd:schema>

 

Assuming "*" indicates an "anonymous element", but such a thing doesn't
exist in Schema definition.

 

How do I achieve this?

 

Regards;

Ayalew

 



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent