Re: Relax NG schema to match entity-reference ints?
David Carlisle <[email protected]>
| Newsgroups | gmane.text.xml.relaxng.general |
|---|---|
| Message-ID | <[email protected]> |
that contain entity-reference integers as attribute values, e.g. the value of the 'output' attribute in <key code="0" output="" /> After the XML parse that character (not entity) reference will be indistinguishable from the character referenced. So, you can't use an integer based constraint, but if your validator supports regexp constraints (eg if it includes xsd:string and its pattern facets) then you could use a regexp to constrain them. The constraint that you gave as an example (less than 10FFFF) isn't required as if the input uses the & # syntax with a number bigger than that it would not be well formed XML. or of course you can change your instances to match your description In general, the value of the output attribute can be a list of integers with values ranging from 0x1 to 0x10FFFF inclusive. in which case you don't want the & # ; syntax, just <key code="0" output="59161" /> David -- http://www.dcarlisle.demon.co.uk/matthew ________________________________________________________________________ This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________