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 3526 - May [xsl:validation] take an AVT?
Summary: May [xsl:validation] take an AVT?
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XSLT 2.0 (show other bugs)
Version: Candidate Recommendation
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: Michael Kay
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-23 20:58 UTC by Colin Adams
Modified: 2006-08-16 18:49 UTC (History)
0 users

See Also:


Attachments

Description Colin Adams 2006-07-23 20:58:32 UTC
I have always assumed it may not, but I cannot find proof of this in the spec. The error messages talk about the effective value of the attribute, which suggest that it might be possible to pass an AVT.
Comment 1 Michael Kay 2006-07-23 21:24:52 UTC
For instructions like xsl:element, the syntax proforma is normative: this has

 <xsl:element
  name = { qname }
  namespace? = { uri-reference }
  inherit-namespaces? = "yes" | "no"
  use-attribute-sets? = qnames
  type? = qname
  validation? = "strict" | "lax" | "preserve" | "strip">
  <!-- Content: sequence-constructor -->
</xsl:element>

Attributes that may be AVTs are shown in curly braces; therefore "validation" is not an AVT.

For literal result elements, we have to rely on the fact that 11.1.1 says that the allowed values of the attribute are defined in 19.2, and in 19.2 the possible values are enumerated in the text as strict|lax|preserve|strip. 

The use of the term "effective value" is perhaps injudicious. It's not hyperlinked to the definition of the term "effective value" as used in relation to AVTs, and is in fact intended as a reference to the statement "If both attributes are omitted, the effect is the same as specifying the validation attribute with the value specified in the default-validation attribute of the containing xsl:stylesheet element; if this is not specified, the effect is the same as specifying validation='strip'."

I think we could probably add clarity by stating explicitly in section 11.1.1 that the value of xsl:validation must be one of these four values and that AVTs are not allowed.
Comment 2 Colin Adams 2006-07-24 05:19:45 UTC
I would endorse your proposed addition to 11.1.1. I spent a lot of time last night double-checking that section, but couldn't find anything definite.
Comment 3 Michael Kay 2006-08-16 18:49:44 UTC
I have added clarifying text to section 11.1.1 as proposed.