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] Errorhandling

The command line filename is not provided to the stylesheet by the XSLT
processor.  I think you will have to pass the filename as a parameter to the
stylesheet at runtime:

xsltproc --stringparam filename "myfile.xml" etc.

Then your error message could include <xsl:value-of select="$filename"/>.

Bob Stayton
Sagehill Enterprises
DocBook Consulting

----- Original Message ----- 
From: "Kai Hagemeister" <kh@planoweb.de>
To: <docbook-apps@lists.oasis-open.org>
Sent: Friday, December 17, 2004 8:16 AM
Subject: [docbook-apps] Errorhandling

> Hello,
> I'm using xsltproc and terminate the process on error.
> What I'm looking for is a way to return (inside of xsl:message) the
> xml-file in which the error occured.
> At this time I can return the line-number but this is not of any help if
> no hint is given in which file one should look for the error.
> <xsl:message terminate="yes">
>  <!-- File ??? -->
>  <xsl:text>Line-number:</xsl:text>
>  <xsl:value-of select="saxon:line-number()"/>
>  <xsl:text>Error: no ID for constraint linkend: </xsl:text>
>  <xsl:value-of select="$linkend"/>
>  <xsl:text>.</xsl:text>
> </xsl:message>
> I hope that someone can assist.
> Kai

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