[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: your comments on 4.6.1 Namespaces and Attributes



> -----Original Message-----
> From: Julian Reschke [mailto:julian.reschke@xxxxxx]
> Sent: Tuesday, June 18, 2002 3:31 AM
> To: ietf-xml-use
> Subject: RE: your comments on 4.6.1 Namespaces and Attributes
> 
> 
> 
> I still feel that section 4.7.1 (in the current draft) is entirely
> misleading.

[snip]

> So here's something I'd prefer:
> 
> 
> 
> 4.7.1 Namespaces and Attributes
> 
> There is a frequently misunderstood aspect of the relationship between
> unprefixed attributes and the default XML namespace - the 
> natural assumption
> is that an unprefixed attribute is qualified by the default 
> namespace, but
> this is not true.  Rather, the unprefixed attribute belongs 
> to no namespace
> at all.  Thus, in the following examples:
> 
>       <ns1:fox a="xxx" ns1:b="qqq" xmlns="http://example.org"; />
>       <fox a="xxx" ns1:b="qqq" xmlns="http://example.org";
> xmlns:ns1="http://example.org"; />
> 
> the attribute "a" is in no namespace, while "ns1:b" is the 
> same namespace as
> the containing element.
> 
> In XML applications, the choice between prefixed and 
> non-prefixed attributes
> frequently is based on whether they always appear inside 
> elements of the
> same namespace (in which case non-prefixed and thereby 
> non-namespaced names
> are used) or whether it's required that they can be applied 
> to elements in
> arbitary other namespaces (in which case a prefixed name is used).
> 
> Both situations occur in the XSLT language: while attributes 
> are unprefixed
> when they occur inside elements in the XSLT namespace, such as
> 
>   <xsl:value-of select="."/>
> 
> they are prefixed when they appear in non-XSLT elements, such as the
> xsl:version attribute when using "literal result element stylesheets":
> 
>   <html xsl:version="1.0" 
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
> xmlns="http://www.w3.org/TR/xhtml1/strict";>
>     <head>
>       <title>Expense Report Summary</title>
>     </head>
>     <body>
>       <p>Total Amount: <xsl:value-of 
> select="expense-report/total"/></p>
>     </body>
>   </html>

Given that this is a significant rewrite of the section, I'd like to ask for
any objections or additional suggested edits before I replace the existing
text with Julian's (subject to some minor editorializing on my part).

-Scott-