tow21_esc scripsit: > I want to do something like: > > namespace xs = "http://www.w3.org/2001/XMLSchema" > > element scalar { > attribute dataType { "xs:integer" }, { xsd:integer } ) | > attribute dataType { "xs:float" }, { xsd:float} } ) | > attribute dataType { "xs:double" }, { xsd:float } ) > > and have it validate elements that look like either of: > > <scalar xmlns:xsd="http://www.w3.org/2001/XMLSchema" > dataType="xsd:integer"> 1 </scalar> > > <scalar xmlns:xs="http://www.w3.org/2001/XMLSchema" > dataType="xs:integer"> 1 </scalar>
No problem. Just change the text literal values of dataType to be QName literals, thus: namespace xs = "http://www.w3.org/2001/XMLSchema" element scalar { (attribute dataType { xsd:QName "xs:integer" }, xsd:integer ) | (attribute dataType { xsd:QName "xs:float" }, xsd:float ) | (attribute dataType { xsd:QName "xs:double" }, xsd:float ) } (I also corrected some syntax errors.) -- "The serene chaos that is Courage, and the phenomenon [EMAIL PROTECTED] of Unopened Consciousness have been known to the John Cowan Great World eons longer than Extaboulism." "Why is that?" the woman inquired. "Because I just made that word up", the Master said wisely. --Kehlog Albran, The Profit http://www.ccil.org/~cowan
