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] Code Block and Xinclude

> -----Original Message-----
> From: Raymond 
> The following code block
> --------------------------------------------------
>    <config param="banner" value="&BANNER;"/>
>    <config param="banner-tabular" value="&BANNER_TABULAR;"/>
>    <config param="feedback.href" value="&FEEDBACK_HREF;"/>
>    <config param="footer" value="&FOOTER;" altval="&ALTVAL_FOOTER;"/>
>    <config param="footlink" value="&FOOT_LINK;" 
> altval="&ALTVAL_FOOT_LINK;"/>
>    <config param="homebanner" value="&HOMEBANNER;"/>
>    <config param="homebanner-tabular" value="&HOMEBANNER_TABULAR;"/>
>    <config param="navbgcolor" value="&NAV_BG_COLOR;"/>
>    <config param="navtocwidth" value="&NAV_TOC_WIDTH;"/>
>    <config param="rcsdate" value="&RCS_DATE;"/>
> --------------------------------------------------------------


> How does one utilize an xinclude for the aforementioned block 
> as it is my understanding that an xinclude'd document requires a singular
root element.

Here is one way to do it. Wrap the config elements in a root element, like

<!DOCTYPE root [
  <config param="banner" value="&BANNER;"/>
  <config .../>

Save the above to a file (config.xml). Then add an XInclude definition to
the webpage files:

<xi:include href="config.xml" xpointer="xpointer(//config)"
  <xi:fallback>XInclude fallback</xi:fallback> 

Note: this only works with an XInclude processor that supports the
xpointer() scheme. Xerces 2.7.0 does not support it, but a recent version of
libxml2 (xmllint/xsltproc) does.


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