Problem in understanding rule [14] of XML spec

Richard Tobin richard at cogsci.ed.ac.uk
Thu Jan 27 13:14:37 GMT 2000


In article <00b601bf68c3$75fb0600$8d6536ca at SERVER.ABINFOSYSTEMS>,
Amit Rekhi <amitr at abinfosys.com> wrote:

>I have not been able to understand the reason why production rule [14]:
>
>CharData: [^<&]* - ([^<&]*  ']]>'  [^<&]*)
>
>is not written like:
>
>CharData: [^<&]* -  ']]>'

Your rule would accept any string of non-<& characters except the string
']]>'.  The rule in the spec accepts any string of non-<& characters 
except ones *containing* the string ']]>'.


>- How would rule [14] behave with the following strings?
>1) abc]]>
>2) abc]]>def

It rejects them both, as intended.

Actually, the rule could have been more simply written

  [^<&]* - (Char*  ']]>'  Char*)

-- Richard

-- 
Spam filter: to mail me from a .com/.net site, put my surname in the headers.

"The Internet is really just a series of bottlenecks joined by high
speed networks." - Sam Wilson

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ or CD-ROM/ISBN 981-02-3594-1
Unsubscribe by posting to majordom at ic.ac.uk the message
unsubscribe xml-dev  (or)
unsubscribe xml-dev your-subscribed-email at your-subscribed-address

Please note: New list subscriptions now closed in preparation for transfer to OASIS.





More information about the Xml-dev mailing list