OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Re: [docbook-apps] Base URI for result of transformation?

Hi Bob,

thanks for your answer !

Bob Stayton wrote:
> Hi Stefan,
> I'm not sure I understand what you are asking for.  8^)
> I don't think the stylesheet can insert xml:base attributes for content
> modules, because the stylesheet doesn't know from which directory any
> given piece of XML in the document comes from.  The parsing process
> takes place before the document is fed to the stylesheet, and it is the
> parsing process that assembles the complete XML document from modules. 
> The great leap forward with XIncludes over system entities is that an
> XInclude processor will insert xml:base attributes during parsing to
> keep track of the source file locations.

Note that I don't think the problem at hand has anything to do with XInclude.
(Though I have to admit that I was confused when a similar question came up
some months ago, then indeed in the context of XInclude processing.)

> Nor can the stylesheet insert xml:base for the document as a whole,
> because the stylesheet doesn't know the path to the document.  The XSLT
> processor does, but it doesn't provide that information to the stylesheet.


> Then the question is whether the stylesheet should pass through to the
> FO file any xml:base attributes that an XInclude processor added.  If
> that is what you meant, then that's a possibility, but I'd have to see
> an example to understand how that would work.  Currently if
> $keep.relative.image.uris is set to 0 then xml:base attributes from the
> XInclude processor are merged (resolved) by the stylesheet into the
> fileref path so they are all relative to the FO file, not the original
> XML module.
> I took a look at the testdocs directory, and it seems that an xml:base
> wouldn't help there anyway.  For example, the
> testdocs/tests/figure.001.xml has a fileref="graphics/duck-small.eps",
> but there is no "graphics" directory under tests.

That's exactly what I find so confusing.

> Rather, these files
> are meant to be processed by the Makefile from above in the testdocs
> directory with a command that processes the path
> "tests/figure.001.xml".  The graphics directory is under testdocs, so
> the relative path works there.

I would have thought that relative paths have the same semantics as
relative URLs in html documents, i.e. they are to be interpreted relative
to the document containing them (thus my asking about xml:base).

What you are saying is that it is relative to the current working directory,
i.e. the one the processor was invoked from. Is that really the case ?
I find that rather surprising !



      ...ich hab' noch einen Koffer in Berlin...

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]