Hello Stefan,

Am Sonntag, 14. April 2013, 14:08:03 schrieb Stefan Seefeld:
> [...]
>       <variablelist>
>     <xi:include href="../vsip/signal.xml"
> 
> xpointer="xmlns(db=http://docbook.org/ns/docbook)xpointer(//db:varlistentry[
> @xml:id='foo'])"/> ...
>       </variablelist>

If I'm not mistaken, you can simplify the above xpointer expression as

  xpointer(id(foo))

Not sure if this scheme is supported, but it maybe worth a try. Maybe you need 
quotes for id(...) so try both notations.


> This works well, but introduces a lot of redundancy as for each chunk
> I'd like to include I have to redefine the namespace used in the xpath
> expression. Is there a way to avoid that, by making this the default in
> some way ? If I just leave out the xmlns() I get an error as the
> xpointer can't be resolved.
> (I'm using xsltproc to process the DB documents.)

I don't think you can avoid the namespace. Have you tried entities? You could 
define a entity (let's say "dbxmlns") inside the internal subset of the DTD:

  <!DOCTYPE chapter 
  [
    <!ENTITY dbxmlns "xmlns(db=http://docbook.org/ns/docbook)">
  ]>

and use it like this:

  <xi:include href="../vsip/signal.xml"
              xpointer="&dbxmlns;xpointer(id(foo))"/>

Entites are resolved before any xinclude processing is done. If this works, I 
think this should be compact enough. ;)


-- 
Gruß/Regards
  Thomas Schraitle


---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org

Reply via email to