|
List Info
Thread: AW: Change error message in output for missing xinclude?
|
|
| AW: Change error message in output for
missing xinclude? |

|
2007-10-16 09:07:37 |
|
| Phil, David and Markus!
Thanks a lot for your help. I have adjusted my mother
file by adding the <xi:fallback> lines. Now the FO/PDF and HTML output
looks good and supplies proper information.
I agree to Markus' opinion, that adjusting the
scripting (which produces the referenced files) would be even more effective.
But we have no influence over it.
Best wishes,
Martin
This is very
easy:
<xi:include href="intro.xml" xmlns i="http://www.w3.org/2001/XInclude"> <xi:fallback> <para>Currently
there is no data available</para>
</xi:fallback> </xi:include>
Phil On 10/15/07, Schramm, Martin < harmanbecker.com">MSchramm harmanbecker.com>
wrote: > Dear list, > > I like to ask you for support in
the following case: > > We have a DB "mother" document, which
contains lots of xinclude > references to other files. Many of these
referenced files are generated > by scripts (containing tables with test
results). These generated files > are written in valid DocBook 4.5
. > > But sometimes there is no data to be published in those
files. So there > is no file and the specific folder is empty, where the
xinclude > reference points to. In this case, when we publish the
"mother" file as > HTML or FO/PDF, there is naturally an error message
in red letters > saying "<xi:include></xi:include>". >
> How can I adjust my customization, so the HTML and FO/PDF output says
> e.g. "Currently there is no data available" in normal font style
instead > of the original error message? > > Thanks a lot
for your support. I could not find any hint that helped me > out of this
problem. > Martin > > We use: DocBook XML V4.5, XSTLProc,
Antenna House V 4.2, > Docbook-xsl-v1-69-1 > >
******************************************* > Harman Becker Automotive
Systems GmbH > Geschaeftsfuehrung: Dr. Peter
Geiselhart - Michael
Mauser - Edwin Summers - Regis
Baudot > Sitz der Gesellschaft: Karlsbad - Registergericht: Mannheim HRB
361395 > > ******************************************* >
Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte
Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail
irrtuemlich erhalten haben, informieren Sie bitte sofort den Absender und
loeschen Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte
Weitergabe dieser Mail ist nicht gestattet. > This e-mail may contain
confidential and/or privileged information. If you are not the intended
recipient (or have received this e-mail in error) please notify the sender
immediately and delete this e-mail. Any unauthorized copying, disclosure or
distribution of the contents in this e-mail is strictly forbidden. >
******************************************* > >
--------------------------------------------------------------------- >
To unsubscribe, e-mail: lists.oasis-open.org">docbook-apps-unsubscribe lists.oasis-open.org >
For additional commands, e-mail: lists.oasis-open.org">docbook-apps-help lists.oasis-open.org >
>
|
| Re: Change error message in output for
missing xinclude? |

|
2007-10-16 11:29:16 |
|
|
I'm not sure if anyone mentioned this, but you
could customize the scripting to handle unresolved xincludes. You create a
template that matches on xi:include to output your own message. The
default message comes from this template that matches on any unrecognized
element:
<xsl:template match="*">
<xsl:message> <xsl:text>Element
</xsl:text> <xsl:value-of
select="local-name(.)"/> <xsl:text> in namespace
'</xsl:text> <xsl:value-of
select="namespace-uri(.)"/> <xsl:text>'
encountered</xsl:text> <xsl:if
test="parent: "> <xsl:text> in
</xsl:text> <xsl:value-of
select="name(parent: )"/>
</xsl:if> <xsl:text>, but no template
matches.</xsl:text> </xsl:message>
<span style="color:
red">
<xsl:text>&lt;</xsl:text> <xsl:value-of
select="name(.)"/>
<xsl:text>&gt;</xsl:text>
<xsl:apply-templates/>
<xsl:text>&lt;/</xsl:text>
<xsl:value-of select="name(.)"/>
<xsl:text>&gt;</xsl:text>
</span> </xsl:template>
You could create a custom template like
this:
<xsl:template match="xi:include">
<span class="EmptyInclude">
<xsl:text>Currently there is no Data available.</xsl:text>
</span> </xsl:template>
and perhaps add an xsl:message if you need
it.
----- Original Message -----
Sent: Tuesday, October 16, 2007 7:07
AM
Subject: AW: [docbook-apps] Change error
message in output for missing xinclude?
Phil, David and Markus!
Thanks a lot for your help. I have adjusted my mother
file by adding the <xi:fallback> lines. Now the FO/PDF and HTML output
looks good and supplies proper information.
I agree to Markus' opinion, that adjusting the
scripting (which produces the referenced files) would be even more effective.
But we have no influence over it.
Best wishes,
Martin
This is very
easy:
<xi:include href="intro.xml" xmlns i="http://www.w3.org/2001/XInclude"> <xi:fallback> <para>Currently
there is no data available</para>
</xi:fallback> </xi:include>
Phil On 10/15/07, Schramm, Martin < harmanbecker.com">MSchramm harmanbecker.com>
wrote: > Dear list, > > I like to ask you for support in
the following case: > > We have a DB "mother" document, which
contains lots of xinclude > references to other files. Many of these
referenced files are generated > by scripts (containing tables with
test results). These generated files > are written in valid DocBook
4.5 . > > But sometimes there is no data to be published in
those files. So there > is no file and the specific folder is empty,
where the xinclude > reference points to. In this case, when we
publish the "mother" file as > HTML or FO/PDF, there is naturally an
error message in red letters > saying
"<xi:include></xi:include>". > > How can I adjust
my customization, so the HTML and FO/PDF output says > e.g.
"Currently there is no data available" in normal font style instead >
of the original error message? > > Thanks a lot for your
support. I could not find any hint that helped me > out of this
problem. > Martin > > We use: DocBook XML V4.5, XSTLProc,
Antenna House V 4.2, > Docbook-xsl-v1-69-1 > >
******************************************* > Harman Becker Automotive
Systems GmbH > Geschaeftsfuehrung: Dr. Peter
Geiselhart - Michael
Mauser - Edwin Summers - Regis
Baudot > Sitz der Gesellschaft: Karlsbad - Registergericht: Mannheim
HRB 361395 > > *******************************************
> Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte
Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail
irrtuemlich erhalten haben, informieren Sie bitte sofort den Absender und
loeschen Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte
Weitergabe dieser Mail ist nicht gestattet. > This e-mail may contain
confidential and/or privileged information. If you are not the intended
recipient (or have received this e-mail in error) please notify the sender
immediately and delete this e-mail. Any unauthorized copying, disclosure or
distribution of the contents in this e-mail is strictly forbidden. >
******************************************* > >
--------------------------------------------------------------------- >
To unsubscribe, e-mail: lists.oasis-open.org">docbook-apps-unsubscribe lists.oasis-open.org >
For additional commands, e-mail: lists.oasis-open.org">docbook-apps-help lists.oasis-open.org >
>
|
[1-2]
|
|
|
about | contact Other archives ( Real Estate discussion Medical topics )
|