Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Wildcards in SML schema

From: Grant Robertson <bogus@-----.------->
To: NULL
Date: 6/5/2007 10:46:00 PM

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 an entire, 
complete instance document for that other schema?

Let's say I have the following schema:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="BogusElement" type="BogusType"/>
    <xs:complexType name="BogusType">
        <xs:sequence>
            <xs:any namespace="http://www.w3.org/1999/xhtml"/>
        </xs:sequence>
    </xs:complexType>
</xs:schema>

It has only the one element BogusElement and it can contain only the one 
child element from the XHTML schema. Does this force the BogusElement 
element in the instance document to contain a complete XHTML document 
including headers or would

<?xml version="1.0" encoding="UTF-8"?>
<BogusElement
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:noNamespaceSchemaLocation="Untitled1.xsd"
  xmlns:xhtml="http://www.w3.org/1999/xhtml">
   <xhtml:strong>Bolded Text.</xhtml:strong>
</BogusElement>

be a valid document under the above schema?

How can I make it so that the contents of the BogusElement element in the 
instance document must be a complete XHTML document in order to be valid? 
Or would I just have to make that a verbal rule, not expressed in the 
schema?

To complicate things further: Let's say I wanted that element to contain 
only one of a list of valid, complete documents such as either a complete 
html document OR a complete XHTML document OR a complete DocBook 
document, all with headers. How would I do that? 

Basically, I am trying to build a standard that acts as an envelope 
around complete documents which can be of various different text-based 
formats. 


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