CARVIEW |
Select Language
HTTP/2 200
date: Sat, 11 Oct 2025 07:27:51 GMT
content-type: text/html
content-encoding: gzip
last-modified: Thu, 13 Jul 2023 17:50:21 GMT
cache-control: max-age=2592000, public
expires: Mon, 10 Nov 2025 04:15:56 GMT
vary: Accept-Encoding
access-control-allow-origin: *
x-request-id: 98cb8a09db3fd96e
strict-transport-security: max-age=15552015; preload
x-frame-options: deny
x-xss-protection: 1; mode=block
cf-cache-status: HIT
set-cookie: __cf_bm=dA2zpvsjxE4SMG9OJXItmGjaRLWZ54WYS7l_c5ruFXU-1760167671-1.0.1.1-kIn7xYaWKckokmxOrB4sBtjbsYZx9hjxHhebH9AfGk7Pb9kMeAMU78HKzvWe2WZsq9tCLPzem1YMYldFIRTE1f700VKEB8pRkk8YABVLrqo; path=/; expires=Sat, 11-Oct-25 07:57:51 GMT; domain=.w3.org; HttpOnly; Secure; SameSite=None
server: cloudflare
cf-ray: 98cca3259e5cc1cc-BLR
alt-svc: h3=":443"; ma=86400
[XQuery] A.2.2 Lexical Rules: bad transitions from Michael Dyck on 2004-01-23 (public-qt-comments@w3.org from January 2004)
[XQuery] A.2.2 Lexical Rules: bad transitions
- From: Michael Dyck <jmdyck@ibiblio.org>
- Date: Fri, 23 Jan 2004 01:07:18 -0800
- To: public-qt-comments@w3.org
- Message-id: <4010E446.524516B8@ibiblio.org>
XQuery 1.0: An XML Query Language W3C Working Draft 12 November 2003 A.2.2 Lexical Rules Some of the lexical states have incorrect transitions, causing the lexer to reject valid queries. Specifically: ------------------------------------------------------------------------ Query: <!---- blah ----> | e Query: <?PITarget ?> | e Query: <![CDATA[x]]> | e Problem: In each case, after the ">", the lexer is in DEFAULT, which doesn't recognize "|" (or any other operator). Fix: In DEFAULT, for the transitions on "<!----", "<?", and "<![CDATA[", change "pushState()" to "pushState(OPERATOR)". Note: I reported this on November 28, 2002 (three versions ago), in https://lists.w3.org/Archives/Public/public-qt-comments/2002Nov/0105.html ------------------------------------------------------------------------ Query: <Q> { typeswitch (e) case e return e default return e } </Q> Problem: After the "}", the lexer is in OPERATOR, which doesn't recognize "</". Fix: In DEFAULT, the transition for <"typeswitch" "("> should not involve "pushState(OPERATOR)". ------------------------------------------------------------------------ Query: processing-instruction {x} {x} Problem: Accepting the last "}" causes popState() on an empty stack. Fix: In OPERATOR, the transition for "{" needs "pushState()". ------------------------------------------------------------------------ Query: declare variable $x as processing-instruction()? external; e Problem: After the ")", the lexer is in OPERATOR, which doesn't recognize "?". Fix: In ITEMTYPE, the transition for <"processing-instruction" "("> should change "pushState(OPERATOR)" to "pushState(OCCURRENCEINDICATOR)". ------------------------------------------------------------------------ Query: declare variable $x external; e Query: declare function Q() external; e Problem: These leave DEFAULT on the stack. It's not clear whether this means that the lexer should reject them, but even if not, it's still bad form: a lexer with a maximum stack size would be much more likely to hit its limit. Fix: In DEFAULT, for the transitions on <"declare" "variable" "$"> and <"declare" "function">, don't "pushState(DEFAULT)". ------------------------------------------------------------------------ -Michael Dyck
Received on Friday, 23 January 2004 04:14:26 UTC