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] using xpointer with modular DocBook


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



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