[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] FW: [[1454121] Path dirs repeated twice in imagedata urls]
Bob Stayton <bobs@sagehill.net> writes: > Yes, I've seen this problem before. It usually happens when the > xml:base attributes added by the XInclude processor are not > correct. That is, the xml:base attributes should be taken as > relative to the containing element. But XInclude processors seem > to have a problem always getting them correct for all > combinations of directory layouts and nested XIncludes. > [...] > This is best diagnosed by running an identity stylesheet using > the XInclude processor and examining the xml:base attributes that > it adds. If you keep track of the contexts and the nesting, you > can usually figure out if the xml:base attributes are not > correct. OK, I ran the source doc through an identity transform first using xsltproc (libxml2) and then through Saxon (using the Xerces XIncludeParserConfiguration class). At the end of this message is a diff that shows the results. (I guess I should mention that the file and pathnames in the source have embedded spaces. There are some places where the libxml2 output has those a real spaces instead a URL-escaped ones.) But ignoring those differences in handling of the embedded spaces (which shouldn't matter), looking at that diff, I see that the Xerces XInclude implementation seems to be putting the wrong value on the xml:base attribute of the chapter that contains the problem "repeated path" (in the fileref value on an imagedata element). As well as putting xml:base values on all the Xincluded sections in the source -- while libxml2 puts no xml:base on those at all. And the Xerces implementation is also putting an empty value on the xmlns:xi attribute... So, the cause of the problem that Mark is seeing does seem to be bugginess in that Xerces Xinclude class. Is there any way that he might be able to work around it? By adding or modifying xml:base attributes explictly set in his source? --Mike --- libxml2-OUT.xml 2006-03-20 13:45:56.204747744 +0900 +++ Xerces-OUT.xml 2006-03-20 13:45:03.167810584 +0900 @@ -1,15 +1,14 @@ -<?xml version="1.0"?> -<book> +<?xml version="1.0" encoding="utf-8"?><book> <title>Drools Manual</title> - <part xml:base="Part - 1/part 1.xml"> + <part xml:base="Part%20-%201/part%201.xml"> <title>dfsw</title> - <chapter xmlns:xi="http://www.w3.org/2003/XInclude" xml:base="Chapter - Rule Engine/Chapter - Rule Engine.xml"> + <chapter xmlns:xi="" xml:base="Part%20-%201/Chapter%20-%20Rule%20Engine/Chapter%20-%20Rule%20Engine.xml"> <title>The Rule Engine</title> - <section> + <section xml:base="Chapter%20-%20Rule%20Engine/Section%20-%20What%20is%20a%20Rule%20Engine.xml"> <title>What is a Rule Engine</title> <para>At the simplest level a <indexterm> @@ -137,7 +136,7 @@ </indexterm>Activations.</para> </section> - <section> + <section xml:base="Chapter%20-%20Rule%20Engine/Section%20-%20Why%20use%20a%20Rule%20Engine.xml"> <title>Why use a Rule Engine</title> <para>Two questions often asked are</para> @@ -187,17 +186,17 @@ </itemizedlist> </section> - <section> + <section xml:base="Chapter%20-%20Rule%20Engine/Section%20-%20Rete%20Algorithm.xml"> <title>Rete Algorithm</title> </section> - <section> + <section xml:base="Chapter%20-%20Rule%20Engine/Section%20-%20Rule%20Base.xml"> <title>Rule Base</title> <para>uuuere</para> </section> - <section> + <section xml:base="Chapter%20-%20Rule%20Engine/Section%20-%20Working%20Memory.xml"> <title>WorkingMemory</title> <para>uuuere</para> @@ -251,7 +250,7 @@ </section> </section> - <section> + <section xml:base="Chapter%20-%20Rule%20Engine/Section%20-%20Agenda.xml"> <title>Agenda</title> <para>uuuere</para> @@ -275,7 +274,7 @@ </section> </section> - <section> + <section xml:base="Chapter%20-%20Rule%20Engine/Section%20-%20Event%20Model.xml"> <title>Event Model</title> <para>uuuere</para> @@ -294,10 +293,10 @@ </section> </chapter> - <chapter xmlns:xi="http://www.w3.org/2003/XInclude" xml:base="Chapter - Rule Language/Chapter - Rule Language.xml"> + <chapter xmlns:xi="" xml:base="Part%20-%201/Chapter%20-%20Rule%20Language/Chapter%20-%20Rule%20Language.xml"> <title>The Rule Language</title> - <section> + <section xml:base="Chapter%20-%20Rule%20Language/Section%20-%20Package.xml"> <title>Package</title> <para>uuuere</para> @@ -321,25 +320,25 @@ </section> </section> - <section> + <section xml:base="Chapter%20-%20Rule%20Language/Section%20-%20Function.xml"> <title>Function</title> <para>uuuere</para> </section> - <section> + <section xml:base="Chapter%20-%20Rule%20Language/Section%20-%20Rule.xml"> <title>Rule</title> <para>uuuere</para> </section> - <section> + <section xml:base="Chapter%20-%20Rule%20Language/Section%20-%20Query.xml"> <title>Query</title> <para>uuuere</para> </section> - <section> + <section xml:base="Chapter%20-%20Rule%20Language/Section%20-%20Field%20Constraints.xml"> <title>Field Constraints</title> <para>uuuere</para> @@ -363,7 +362,7 @@ </section> </section> - <section> + <section xml:base="Chapter%20-%20Rule%20Language/Section%20-%20Conditional%20Elements.xml"> <title>Conditional Elements</title> <para>uuuere</para> @@ -402,4 +401,4 @@ </part> <index/> -</book> +</book>
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]