Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Can this be done in XSD?

From: "Sven Groot" <sveng3000@---.--->
To: NULL
Date: 11/1/2004 3:10:00 PM
I have the following XML document.

<foo:Bar xmlns:foo="urn:foo-namespace">
  <SomeElt foo:id="test" foo:someparam="bar" someotherparam="someothervalue" 
/>
</foo:Bar>

I want to create a schema for the foo namespace. The Bar element should be 
able to contain any element without a namespace. This is easily accomplished 
by using <xs:any namespace="##local" processContents="skip" />

However, as you can see, these elements do contain attributes from the foo 
namespace. Is it possible to have these attributes validated. For instance 
if foo:someparam is a simpleType enumeration that allows only the values 
"foo" and "foo2", how would I have it trigger a schema exception on the 
above document? What do I need to write in my XSD to make it validate those 
attributes. Obviously processContents="skip" is wrong, but "lax" has the 
same results.

Is there any way this can be done, and if so, how?

Thanks in advance.

-- 
Sven Groot 




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