Thanks Hussein, it worked out great!

----- Original Message ----- 
From: "Hussein Shafie" <[email protected]>
To: "Tin Pham" <ttpham3 at learn.senecac.on.ca>
Cc: <xmleditor-support at xmlmind.com>
Sent: Wednesday, October 13, 2004 4:45 AM
Subject: Re: [XXE] XIncludes not working with a Docbook document.


> Tin Pham wrote:
>> http://www.xmlmind.com/xmleditor/tutorial.html#id.s2.3 show the use of
>> XIncludes.
>>
>> The tutorial shows how one can take a repetitive phrase such as, "Foo
>> Bar Inc.", place it in an external file and make a reference to it. This
>> allows one to change "Foo Bar Inc" to "Tin Bar Inc" at one place and see
>> it propagate throughout.
>>
>> I tried the tutorial with a xhtml document and successfully made a
>> reference to VATrates.html. However, when I try the same steps with a
>> docbook document the paste step did not work.
>>
>> Is XIncludes possible in a docbook document?
>> If I can not do this with a docbook document, then can somebody suggest
>> another way of doing this?
>>
>> References,
>> http://www.xmlmind.com/pipermail/xmleditor-support/2004-August/002190.html
>> http://www.xmlmind.com/pipermail/xmleditor-support/2004-June/002047.html
>>
>
> It sure works, unless you are trying to XInclude an XHTML <span> in a
> DocBook document.
>
> For DocBook, you need to use <phrase>s.
>
> Please find attached to this email, the VATrates.html converted to
> DocBook (VATrates.xml + a simple <chapter> test using it:
> TestVATrates.xml); just to give you a quick start.
>


--------------------------------------------------------------------------------


> <?xml version="1.0" encoding="ISO-8859-1"?>
> <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
> "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd";>
> <article>
>  <title>VAT rates applicable in EU countries</title>
>
>  <para>Identical to <filename>VATrates.html</filename>, expect that this 
> is a
>  DocBook article. Just in case, you want to test XIncludes with a DocBook
>  document.</para>
>
>  <section>
>    <title>VAT rates applicable in EU countries (2003/01/01)</title>
>
>    <informaltable>
>      <tgroup cols="3">
>        <thead>
>          <row>
>            <entry align="center">Country</entry>
>
>            <entry align="center">Standard Rate</entry>
>
>            <entry align="center">Other Rates</entry>
>          </row>
>        </thead>
>
>        <tbody>
>          <row id="austria">
>            <entry><phrase>Austria</phrase></entry>
>
>            <entry><phrase id="austria_vat">20%</phrase></entry>
>
>            <entry><phrase>10%, 12%</phrase></entry>
>          </row>
>
>          <row id="belgium">
>            <entry><phrase>Belgium</phrase></entry>
>
>            <entry><phrase id="belgium_vat">21%</phrase></entry>
>
>            <entry><phrase>6%, 12%</phrase></entry>
>          </row>
>
>          <row id="denmark">
>            <entry><phrase>Denmark</phrase></entry>
>
>            <entry><phrase id="denmark_vat">25%</phrase></entry>
>
>            <entry><phrase>-</phrase></entry>
>          </row>
>
>          <row id="finland">
>            <entry><phrase>Finland</phrase></entry>
>
>            <entry><phrase id="finland_vat">22% </phrase></entry>
>
>            <entry><phrase>8%, 17%</phrase></entry>
>          </row>
>
>          <row id="france">
>            <entry><phrase>France</phrase></entry>
>
>            <entry><phrase id="france_vat">19.6%</phrase></entry>
>
>            <entry><phrase>2.1%, 5.5%</phrase></entry>
>          </row>
>
>          <row id="germany">
>            <entry><phrase>Germany</phrase></entry>
>
>            <entry><phrase id="germany_vat">16%</phrase></entry>
>
>            <entry><phrase>7%</phrase></entry>
>          </row>
>
>          <row id="greece">
>            <entry><phrase>Greece</phrase></entry>
>
>            <entry><phrase id="greece_vat">18%</phrase></entry>
>
>            <entry><phrase>4%, 8% </phrase></entry>
>          </row>
>
>          <row id="ireland">
>            <entry><phrase>Ireland</phrase></entry>
>
>            <entry><phrase id="ireland_vat">21%</phrase></entry>
>
>            <entry><phrase>4.3%, 13.5%</phrase></entry>
>          </row>
>
>          <row id="italy">
>            <entry><phrase>Italy</phrase></entry>
>
>            <entry><phrase id="italy_vat">20%</phrase></entry>
>
>            <entry><phrase>4%, 10%</phrase></entry>
>          </row>
>
>          <row id="luxemburg">
>            <entry><phrase>Luxemburg</phrase></entry>
>
>            <entry><phrase id="luxemburg_vat">15% </phrase></entry>
>
>            <entry><phrase>3%, 6%, 12%</phrase></entry>
>          </row>
>
>          <row id="portugal">
>            <entry><phrase>Portugal</phrase></entry>
>
>            <entry><phrase id="portugal_vat">19% </phrase></entry>
>
>            <entry><phrase>5%, 12%</phrase></entry>
>          </row>
>
>          <row id="spain">
>            <entry><phrase>Spain</phrase></entry>
>
>            <entry><phrase id="spain_vat">16%</phrase></entry>
>
>            <entry><phrase>4%, 7%</phrase></entry>
>          </row>
>
>          <row id="sweden">
>            <entry><phrase>Sweden</phrase></entry>
>
>            <entry><phrase id="sweden_vat">25%</phrase></entry>
>
>            <entry><phrase>6%, 12%</phrase></entry>
>          </row>
>
>          <row id="netherlands">
>            <entry><phrase>Netherlands</phrase></entry>
>
>            <entry><phrase id="netherlands_vat">19%</phrase></entry>
>
>            <entry><phrase>6%</phrase></entry>
>          </row>
>
>          <row id="uk">
>            <entry><phrase>United Kingdom</phrase></entry>
>
>            <entry><phrase id="uk_vat">17.5%</phrase></entry>
>
>            <entry><phrase>5% </phrase></entry>
>          </row>
>        </tbody>
>      </tgroup>
>    </informaltable>
>  </section>
> </article>


--------------------------------------------------------------------------------


> <?xml version="1.0" encoding="ISO-8859-1"?>
> <chapter>
>  <title>Test</title>
>
>  <section>
>    <title>Test</title>
>
>    <para>The VAT rate of France is <xi:include href="VATrates.xml"
>    xmlns:xi="http://www.w3.org/2001/XInclude"; xpointer="france_vat" />.
>    <xi:include href="VATrates.xml" 
> xmlns:xi="http://www.w3.org/2001/XInclude";
>    xpointer="france_vat" /> is higher than the VAT rate of Germany
>    <xi:include href="VATrates.xml" 
> xmlns:xi="http://www.w3.org/2001/XInclude";
>    xpointer="germany_vat" />.</para>
>  </section>
> </chapter>


--------------------------------------------------------------------------------


>
> --
> XMLmind XML Editor Support List
> xmleditor-support at xmlmind.com
> http://www.xmlmind.com/mailman/listinfo/xmleditor-support 


Reply via email to