On Friday, May 10, 2013 06:01:22 PM Jirka Kosek wrote:
> On 8.5.2013 7:19, Bob Stayton wrote:
> > Would have time to take a look at this? It seems Alexey spent a
> > great deal of time sorting out the namespace issues for the DocBook
> > titlepage template system, and has proposed many improvements. As
> > far as I can tell, they make sense, but I think you should look at
> > it.
>
> Sure, I originally skipped message as from subject line I got impression
> it's related to slides only.
Sorry for a confusing title. This originated as a narrow fix for slides templates, but,
through that notorious "let's-fix-one-more-issue" approach quickly evolved into a
rework of namespace handling.
> > This issue, however, shows that the titlepage.xsl is not not fully
> > namespace aware. First, it shouldn't "autoguess" the namespace for
> > t:wrapper - instead, it should just discover the namespace referred
> > to by the t:wrapper attribute.
>
> Autoguessing is here just for backward compatibility. Ideally namespace
> should be passed by ns parameter. Problems you have seen in slides
> titlepages are caused by missing ns parameter in the build script.
I agree that the problem was the slides templates were incorrectly generated - I stated
so in my original email. However, my point is that target namespace can be precisely
determined by checking the namespace declaration for the wrapper element; this
approach works even if that element has no namespace declaration (as in HTML).
> > Attached patches deal with these issues:
> Thanks for the patches. There are many good ideas in your code, but I'm
> little bit worried about backward compatibility -- in past we have tried
> very hard to keep old titlepage templates to work with newer versions of
> stylesheets. I'm not sure whether this is still true with all your
> proposed changes.
Unfortunately, it is not possible to fix the issues with namespace while fully preserving
backwards compatibility: as I mentioned in the original email, the problem is that some
of the current templates use the default namespace for elements from different XML
vocabularies: for example, XHTML and DocBook:
<t:titlepage-content t:side="recto">