Bug 19839 - [XSLT30] suggestion for an improved text for definition
Summary: [XSLT30] suggestion for an improved text for definition
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XSLT 3.0 (show other bugs)
Version: Working drafts
Hardware: All All
: 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: 2012-11-03 14:50 UTC by Mukul Gandhi
Modified: 2013-02-15 13:50 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mukul Gandhi 2012-11-03 14:50:40 UTC
I'm reading the "XSLT 3.0 draft spec, dated 18 October 2012", and I've following suggestions.

In the section "2.1 Terminology", the following definition is specified:

"The term typed value is defined in Section 5.15 typed-value Accessor. Every node except an element defined in the schema with element-only content has a typed value."

I think, it would be better if the following phrase within the above definition,
'element defined in the schema'

is changed to,

(1)
'element declared in the schema'

OR

(2)
'element specified in the schema'

It seems (1) is better than (2), because its consistent with the terminology used in XSD specification.
Comment 1 Michael Kay 2012-11-03 17:47:55 UTC
Oh dear, once you look at these things it always gets more difficult, and the danger is that in the interests of precision, you make the text less readable...

Actually, "element" here means in individual node, and it's not the fact that there is an element declaration in the schema that's relevant. It's the "type annotation" of the element that matters; the type annotation is a reference to a type defined in the schema, and the discussion is about whether that type has element-only content. 

I've never really understood why elements are declared and types are defined, but the correct phrase should probably be "except an element whose type annotation identifies a type defined in the schema to have element-only content" - I don't want to go as far as using SCM property names like {variety} in curly braces, since this text is only really a precis of what XDM has to say on the matter.
Comment 2 Mukul Gandhi 2012-11-04 05:05:05 UTC
the modification, "except an element whose type annotation identifies a type defined in the schema to have element-only content" looks nice to me.

> I've never really understood why elements are declared and types are defined

What I've understood, that this is conceptually similar to variable declarations in quite a number of programming languages. For e.g, when we write "int x;" in a programming language we say that a variable "x" is declared while a type "int" was defined.

In an XSD document if we write,

<xs:element name="x" type="int"/>  and then if we compare this with an example "int x;", we can say with XSD that an element is declared and a type is defined.
Comment 3 Michael Kay 2013-02-12 11:00:16 UTC
Agreed that we should use a phrase along the lines of:

"except an element whose type annotation identifies a type defined in the schema to have element-only content"
Comment 4 Michael Kay 2013-02-15 13:50:08 UTC
The phrase I decided to use is:

Every node, other than an element whose type annotation identifies it as having element-only content, has a typed value.