[Schematron] SVRL Output
Ganesh Babu N
nbabuganesh at gmail.com
Thu Mar 12 01:30:16 EDT 2009
Here is the XSLT from viewing the SVRL xml output in Browser.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:sch="http://www.ascc.net/xml/schematron"
xmlns:iso="http://purl.oclc.org/dsdl/schematron"
xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
version="1.0">
<xsl:output method="html" indent="yes"/>
<xsl:template match="/">
<html>
<head><title><xsl:value-of select="//svrl:text"/></title></head>
<body>
<xsl:apply-templates/>
</body>
</html>
</xsl:template>
<xsl:template match="svrl:text"><h2
align="center"><xsl:apply-templates/></h2></xsl:template>
<xsl:template match="svrl:text[2]"><h3 align="left"><font
color="magenta"><xsl:value-of select="substring-after(.,
'/')"/></font></h3></xsl:template>
<xsl:template match="svrl:failed-assert">
<xsl:choose>
<xsl:when test="@flag = 'fatal'">
<p><font color="red"><font color="green"><xsl:value-of
select="@line"/>-<xsl:value-of select="@column"/>: </font>ERROR:
<xsl:value-of select="svrl:text"/></font></p>
</xsl:when>
<xsl:when test="@flag = 'warning'">
<p><font color="blue"><font color="green"><xsl:value-of
select="@line"/>-<xsl:value-of select="@column"/>: </font>Warning:
<xsl:value-of select="svrl:text"/></font></p>
</xsl:when>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
Regards,
Ganesh
On Wed, Mar 11, 2009 at 6:46 PM, Walsh, Catherine <cwalsh at mitre.org> wrote:
> Oh yes, that would be of MUCH use, actually...
> Is this stylesheet somewhere where I could access it?
>
> yes, that would be really great.
>
>
> Thanks,
>
> Kate Walsh
> 967-8007
> cwalsh at mitre.org
>
> :: :: ::
>
>
>
> -----Original Message-----
> From: Dave Pawson [mailto:dave.pawson at gmail.com]
> Sent: Wednesday, March 11, 2009 4:02 AM
> To: Walsh, Catherine
> Cc: Rick Jelliffe; SVRL
> Subject: Re: [Schematron] SVRL Output
>
> 2009/3/10 Walsh, Catherine <cwalsh at mitre.org>:
>> I was certain that when I started doing Schematron work, I read about an option to get output in either XML OR HTML format.
>> After a lengthy search I don't seem to be able to find the HTML option anymore.
>> Did I imagine that??
>>
>>
>> So now, I would be thrilled if I could somehow reduce the output to just <file name="instanceFile.xml"> and <svrl:text> tags.
>>
>> Is that possible?
>>
>> Anyone know how to do that?
>
>
> I have a stylesheet that converts ISO svrl into html if that's any use
>
> regards
>
>
> --
> Dave Pawson
> XSLT XSL-FO FAQ.
> Docbook FAQ.
> http://www.dpawson.co.uk
> _______________________________________________
> Schematron mailing list
> Schematron at eccnet.com
> http://www.eccnet.com/mailman/listinfo/schematron
>
More information about the Schematron
mailing list