Re: On the promotion and demotion of information items (was Re
From: "K. Ari Krupnikov" <ari@c...> > What's wrong with using PIs for that? The files use comments. Different rave :-) > Incidentally, some WXS experts might say that you want to allow any > elements in namespaces other than yours at any position in the > document, and attributes in other namespaces on any elements precisely > because this allows "I don't know what it is but I included it anyway" > information "anywhere" in the document. Good point. But it is a bogus approach, because if the schema writer thought the information was useful, they would have made the elements in the same namespace. (It also may be a bogus approach because it is more likely that the recipient will alter the schema to cope with their specific changes, and so the sender would pass the buck on openness to the recipient.) The trouble is that it makes it the problem of the schema-writer to foresee that they missed something. And human nature does not work like that IMHO. Also, in the current case we have start and end tags, so the schema language would have to be able to support something like "promoting the descendents in this namespace of all descendents in other namespaces of this element will result in a content model that looks like this: ( add* )"  I think RELAX NG can do this kind of thing a little (see the RELAX NG schema for RDF for example of anonymous layers), but only a madman would write a schema like that: highly complicated just to cope with interposed layers whose justification is hypothetical at the time the schema was developed. Cheers Rick Jelliffe  In Schematron you could use something like <rule test=".//*[namespace()=current*()/namespace()] [ancestor::*[current()*/namespace()][name()=current()/name()]]..."> to prefix the rules to cope with arbitrarily interposed elements in different namespaces, I guess. Yuck.
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format