[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Problem with links
It turns out this is a known bug in xsltproc. The explanation is that the entity content does not inherit the namespaces from the ancestor element as it should. The stylesheet handles docbook 5 documents by first stripping out the namespaces and converting any elements to what are essentially docbook4 elements. This is done so that a new version of the stylesheets doesn't have to be created to handle matches on elements with the docbook namespace. In this case, a link with xlink:href is converted to a ulink with url attribute. But if it doesn't have a namespace on it, such conversion does not take place, leaving a link with xlink:href which the stylesheet does not handle properly. In the long run there will probably be a separate stylesheet that handles all the docbook 5 stuff natively in its namespace, but that isn't available yet. The workaround is to make sure your entities have all the namespace markup that they need. Here is the info from Daniel Veillard: --------------------------------------------------------------------- Yes known bug. the parsing of the entities doesn't see the namespace declarations from the reference point, the parsing being done out of context. The origin lays in libxml2 being designed for authoring, I wanted multiple entities references to share the same subtree at the time, this was mostly okay before namespaces. I should revisit the issue since nobody really author XML as XML and entities are just a design mistake if you think of them as shared docuemnt part as we used to. Oh well, sorry, just repeat your namespaces declarations, it will also ease the transition to to XInclude for those use cases... Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ Bob Stayton Sagehill Enterprises DocBook Consulting bobs@sagehill.net ----- Original Message ----- From: <POD69@gmx.net> To: <docbook-apps@lists.oasis-open.org> Sent: Thursday, September 07, 2006 1:36 AM Subject: [docbook-apps] Problem with links > Hello > > I have a big problem I have these two files below: > - If i let it run and generate output the link on the book tag works but > not the link in file two it points to the document? Does anyone know how > to solve that problem?: > > thanks peter > > file one: > > <?xml version='1.0'?> > > <!DOCTYPE book [ > > <!ENTITY links SYSTEM "Links.xml"> > ]> > > > <book xmlns="http://docbook.org/ns/docbook" > xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0" xml:lang="en" > > > <info> > <title></title> > > </info> > > <chapter> > <title> </title> > <para> > <link xlink:href="http://www.msn.com"> http://www.msn.com</link> > </para> > <para> > &links; > </para> > > > </chapter> > </book> > > file two: > > > <para> > <table xml:id="links" frame='all'> > <title>Link List</title> > > <tgroup cols='2' align='left' colsep='1' rowsep='1'> > <colspec colname='Description'/> > <colspec colname='Link'/> > > <tbody> > <row> > <entry>msn</entry> > <entry> > <link > xmlns:xlink="http://www.w3.org/1999/xlink" > xlink:href="http://www.msn.com" > > http://www.msn.com > </link> > </entry> > </row> > </tbody> > </tgroup> > </table> > > </para> > -- > > > Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! > Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer > > --------------------------------------------------------------------- > To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org > For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org > > >
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]