![]() |
|
|
|||||||
![]() |
XML - RELAX NG: emulating XSD <any> wildcard with processContents="lax"? |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
I'm trying to figure out how to define an element in RNC so that its
contents are validated if a definition matches, othewise no validation is done. The example given in the tutorial seems to indicate that you need to exclude by enumeration all defined attributes and elements: #this validates all attributes loosely, except for the defined xml:space attribute element example { attribute * - xml:space { text }*, attribute xml:space { "default" | "preserve" }? } What I would like to do is: element example { attribute * - xml:* {text}*, attribute xml:* } But this won't parse. jiffers |
|
|
|
|
#2 |
|
Posts: n/a
|
namespace foo = "http://www.w3.org/1999/xhtml"
anyOtherElement = element * - foo:* { #any element names not in this namespace attribute * { text }*, (text | anyElement)* } anyElement = { anyOtherElement* & element foo:* #any element names in this namespace } The problem is that the last line is trying to validate against element names in the namespace, not grammar definitions in the namespace. How do you refer to all top-level grammars in the schema without enumerating them? Can you? |
|