Nathan Nadeau schrieb am 23.11.2009 um 18:12:01 (-0500):
> The source of the problem is that FOP is mistakenly calculating the
> base-URI for the images. The purpose of xml:base is to rectify
> situations like this, but it seems that FOP does not know what to do
> with xml:base. For you, it's reporting xml:base as an invalid
> attribute of the fo:block element. For me, it just ignores xml:base
> and continues (of course still incorrectly resolving the image URIs).
> 
> First thing I would verify is that your XSLT and/or XSL-FO files are
> aware of the "xml" namespace. I tried this first on my setup, but it
> did not help. Maybe it will help you?

Can't help with FOP, but as for the "xml" namespace, it does not need to
be declared as it is by default.

http://www.w3.org/TR/xml-names/#ns-decl

  Namespace constraint: Reserved Prefixes and Namespace Names

  The prefix xml is by definition bound to the namespace name
  http://www.w3.org/XML/1998/namespace. It MAY, but need not,
  be declared, and MUST NOT be bound to any other namespace
  name. Other prefixes MUST NOT be bound to this namespace
  name, and it MUST NOT be declared as the default namespace.

Note that the notion of *files* being "aware" of the "xml" namespace is
misleading. A *parser* implementing namespaces is required to have a
binding for "xml" to the appropriate namespace.

Next, there needs to be support for xml:base. XSLT 1.0, which was
published in 1999 [1], does not mention xml:base, which was published
two years later [2]. However, there is support for base URIs.

Support for enhanced base URIs as per the 2001 xml:base add-on is up to
the implementation:

* Saxon 6.5      - yes
* LibXSLT 1.1.24 - yes
* Xalan-J 2.7.1  - no

Last, in XSLT/XPath 2.0 you can access the base URI directly using the
base-uri() function [3].

[1] http://www.w3.org/TR/xslt#base-uri
[2] http://www.w3.org/TR/xmlbase/
[3] http://www.w3.org/TR/xpath-functions/#func-base-uri

-- 
Michael Ludwig

Reply via email to