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] XInclude without xml:base


Thomas, I am having some problems with the generated xml:base, so yes, 
it my case it's harmful. The issue is, I have a directory hierarchy like 
this:
book/chapter/section/images

In each directory there's a docbook file to be included in the upper 
level  document.  So, I have in section1.xml and XInclude with a 
reference to images/image1.svg, now the issue is the final generated 
"FO" has xml:base "section/images" only. The first two are gone. When I 
generate pdf using fop I get an error about not finding the given file. 
I don't know how to explain this, but this is the case with xsltproc and 
with xalan-j ! this is what really confusing me.

I am including the whole SVG graphic file in my documents so there's no 
need for xml:base attribute especially if it's behaving this way. I 
looked around for a way to disable this attribute but couldn't find.

My way around was a little bit weired. Since I am generating the SVG 
graphics from an xml files. I included the xml file and added a template 
to process it in my customization layer. This way it's not relying on an 
external graphics file but definitely it takes longer to compile the 
document. So it's working for me, but the original issue is not  
resolved, which is, the wrong xml:base attribute.


Thomas Schraitle wrote:
> Hi,
>
> On Montag, 3. März 2008, Mansour wrote:
>   
>> I am looking to include a file in my docbook document, but I don't want
>> to generate xml:base. Is there a way to do this ??
>> I know "keep.relative.image.uris" can be used. But I am not using
>> images. I need to include a text/xml file.
>>     
>
> I am not sure what you want to achieve, so maybe some background 
> information might be useful:
>
> According to the XInclude specification[1], "each element information item 
> in the top-level included items which has a different base URI than its 
> include parent has an attribute information item added to its attributes 
> property. [see 4.5.5 Base URI Fixup]" (which is in fact the xml:base 
> attribute).
>
> There *may* be an option in your XML parser or XInclude processor, 
> because "An XInclude processor may, at user option, suppress xml:base 
> and/or xml:lang fixup." [see 4.5 Creating the Result Infoset] So you 
> should check the available options.
>
> If there is no option, I fear, the only method is to post process your 
> document with an XSLT stylesheet. You have to copy every element, 
> attribute, comment and processing instruction node except xml:base. I 
> don't think, this is a good idea. Normally, xml:base isn't harmful.
>
>
> Hope it was a bit helpful. :)
>
>
> Bye,
> Tom
>
> -------
> [1] http://www.w3.org/TR/xinclude/
>
>
>   



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