Hi Hussein,

> 
> 
> Using DTDs or W3C XML Schemas, there is *no way* to allow or forbid a 
> child element such as "size" depending on the value of attribute "type" 
> of parent element "property".
> 

I was fearing that...I saw something about an extension called 
"Schematron" that is providing a workaround, but that is obviously not 
usable within XXE.

> To my knowledge, only Relax NG -- http://www.relaxng.org/ -- allows to 
> do specify this; and Relax NG is unfortunately not yet supported by XXE.
> 
> We recommend to make your schema more strongly typed, that is to define 
> a special <array> node.
> 

I guess I won't get around that easily. (Actually, we use a special 
<array> type right now..)

> However, if you really don't want to do that and if you can program in 
> Java, it is pretty easy to write a DocumentHook which is invoked by XXE 
> just after the validation by the DTD or the W3C XML Schema (among other 
> things).
> 
> A DocumentHook, see 
> http://www.xmlmind.com/xmleditor/_distrib/docs/dev/ar01s08.html, has 
> mainly been designed to allow to perform a semantic validation which 
> goes beyond what can be done by DTDs and W3C XML Schemas alone.
> 

I didn't get into Java yet, but I guess someone here will have a look at 
that later.

> ---
> PS: If you create a W3C XML Schema in XXE and you specify both a "type" 
> attribute and a "xs:complexType" child element for an "xs:element", you 
> get a *semantic* error detected by the ``built-in DocumentHook for W3C 
> XML Schemas'' and not a *structural* error detected by the standard 
> validation by the Schema for Schemas.
> 

Ah! That's a valuable little detail :-)

Thank you for the great support. We are really convinced about your product!

Best regards,

- Martin


-- 

| Martin Strubel                  // Photonfocus::SoftwareDeveloper |
| Photonfocus AG, Switzerland                   Tel. +41 55 4510132 |
| ----------------------------------------------------------------- |


Reply via email to