This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 1883 - scenario attribute for Constr-attr-content-*
Summary: scenario attribute for Constr-attr-content-*
Status: CLOSED FIXED
Alias: None
Product: XML Query Test Suite
Classification: Unclassified
Component: XML Query Test Suite (show other bugs)
Version: unspecified
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Andreas Behm
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-23 10:38 UTC by David Carlisle
Modified: 2006-08-09 10:02 UTC (History)
1 user (show)

See Also:


Attachments

Description David Carlisle 2005-08-23 10:38:22 UTC
Constr-attr-content-1
  is marked in the catalog as runtime-error but it looks OK to me
  (and saxon parses and evaluates it without error)
Constr-attr-content-3 
  is marked in the catalog as runtime-error but { and } are treated
  symmetrically by the EBNF, so I believe this should be a parse-error
  (like Constr-attr-content-2)
  (even though the test applet does parse -3 but not -2)
Constr-attr-content-4 
   as for -3, the  EBNF treats < similarly to {}
   [152] QuotAttrContentChar ::= Char - ["{}<&]
   so I believe this unquoted < should be a parse error.
Constr-attr-content-5 
   as for -3, the  EBNF treats & similarly to {}
   so I believe this unquoted & should be a parse-error.

(while converting to XqueryX, tests that are marked as runtime-error
should have a valid xqueryx translation, but typically tests marked as
parse-error do not. The above were flagged as I had an unexpected failure to
convert these tests as they were marked as runtime-error rather than parse-error.)

David
Comment 1 Andreas Behm 2005-09-06 18:03:32 UTC
fixed the scenario attribute as suggested.
Comment 2 David Carlisle 2005-12-12 10:45:28 UTC
confirmed fixed in 0.8.2
Comment 3 Martin Probst 2006-02-27 14:04:48 UTC
Constr-attr-content-4 is actually still incorrect in my opinion. An escaped <
sign (&lt;) is completely valid in XML - find me an XSLT document which doesn't
contain at least one of them.

http://www.w3.org/TR/2004/REC-xml-20040204/#sec-starttags (referred from
http://www.w3.org/TR/xquery/#id-attributes) states that the replacement text of
an entity may not contain a '<'. However
http://www.w3.org/TR/2004/REC-xml-20040204/#sec-predefined-ent says that the
replacement text for '&lt;' is not '<', but '&#38;#60;', which is the character
reference for '<'. So, while it's really obscured in the spec, '<' is legal in
attribute values.
Comment 4 David Carlisle 2006-02-27 15:11:43 UTC
(In reply to comment #3)

Martin, I don't understand your comment. 
> An escaped < sign (&lt;) is completely valid in XML 
This is true but the < in this test is unescaped, it's just a < and this isn't
legal in XML or in XQuery, you have to code it as &lt; or something equivalent,
surely?

   QuotAttrContentChar ::=  Char - ["{}<&]

forces you to escape < in attribute constructors.
Comment 5 Martin Probst 2006-02-27 15:32:18 UTC
Sorry, I've been fooled by my testmachinerie which generates XML, which escapes
the &lt; just to de-escape it later.