Re: xsl-fo validity

On Fri, Aug 14 2009 06:35:06 +0100, florin.vasilian@ecrion.com wrote:
> I strongly disagree. 
> <prefix:element prefix:attribute="some value" xmlns:prefix="a namespace
> URI"/> is valid XML, no question about that. 
> Moreover, 
> <other_prefix:element other_prefix:attribute="some value"
> xmlns:other_prefix="a namespace URI"/> should be treated by the parser in
> the same manner as the first one if the namespace URI is the same. 
>
> FOP can't handle either. All commercial renderers (Antenna House, Ecrion,
> RenderX) can handle both. 

XSL 1.1 supports [5] both XML Names 1.0 [1] (with XML 1.0 documents) and
XML Names 1.1 [2] (with XML 1.1 documents).

Your assertions about the equality of the XML where only the namespace
prefixes differ is correct.

However, an unprefixed attribute (even when there is a default namespace
in effect) and a prefixed attribute with the same local name are not
identical.

See the second example in Section 6.3 [3][4] of either Rec.  In
particular, note that there are two separate attributes in:

   <good a="1" n1:a="2" />'

Which does mean that this is legal XML:

   <fo:block start-indent="10.620px" fo:start-indent="620px">

The XSL 1.1 Recommendation states that it uses the 'fo:' prefix "for
referring to elements in the XSL namespace".  It doesn't use it for
attributes.  None of the examples in the Rec use prefixed attributes for
properties.

You have the option of your implementation equating prefixed property
names with property names, but IMO that is not the intent of the XSL
Rec, and generated FO will be more portable if it doesn't prefix the
property names.

You, or anyone, are welcome to raise a comment about this on the XSL-FO
Bugzilla [7].  (I'm going away tomorrow so I don't have time to do it
myself.)

Regards,


Tony Graham                         Tony.Graham@MenteithConsulting.com
Director                                  W3C XSL FO SG Invited Expert
Menteith Consulting Ltd                               XML Guild member
XML, XSL and XSLT consulting, programming and training
Registered Office: 13 Kelly's Bay Beach, Skerries, Co. Dublin, Ireland
Registered in Ireland - No. 428599   http://www.menteithconsulting.com
  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --
xmlroff XSL Formatter                               http://xmlroff.org
xslide Emacs mode                  http://www.menteith.com/wiki/xslide
Unicode: A Primer                               urn:isbn:0-7645-4625-2


[1] http://www.w3.org/TR/REC-xml-names/
[2] http://www.w3.org/TR/xml-names11/
[3] http://www.w3.org/TR/REC-xml-names/#uniqAttrs
[4] http://www.w3.org/TR/xml-names11/#uniqAttrs
[5] http://www.w3.org/TR/xsl11/#d0e389
[6] http://www.w3.org/TR/xsl11/#xsl-namespace
[7] http://www.w3.org/XML/2008/01/xsl-fo-bugzilla.html

Received on Thursday, 20 August 2009 13:15:25 UTC