Use 

<xsl:import-schema (details of the schema for your result document)>

<xsl:template match="/">
  <xsl;result-document validation="strict">
    <your code here>
 </xsl:result-document>
</xsl:template>

Michael Kay
Saxonica


On 28 May 2013, at 22:29, Maria Amuchastegui wrote:

I'm not familiar with the xsl:result-document tag. Where is it supposed to go within the stylesheet? Based on the error message, it sounds like it's in the wrong place. I'm also getting an error message that a schema-aware XSLT processor is needed, even though I am invoking Saxon EE.

I added the following to my stylesheet:
<xsl:result-document validation="strict"/>

Now I'm getting the following error messages:

  XTSE1660: To perform validation, a schema-aware XSLT processor is needed
Error at xsl:result-document on line 159 column 44 of myxsl.xsl:
  XTSE0010: Element xsl:result-document must not appear directly within xsl:stylesheet
Failed to compile stylesheet. 2 errors detected.


-Maria



On Tue, May 28, 2013 at 3:03 PM, Michael Kay <mike@saxonica.com> wrote:
You need to request output validation from within the stylesheet itself, using (typically)

xsl:result-document validation="strict"

It's not possible to request this from the command line. (I think the reason for this was probably that I considered it non-conformant with the spec, though I'm not sure that's really a sound argument.)

Michael Kay
Saxonica

On 28 May 2013, at 18:23, Maria Amuchastegui wrote:

> I need to validate result documents against a schema, but I am not getting any error messages when the result documents do not validate. Is there a parameter that I need to specify on the command line?
>
> This is what I am currently using:
>
> java -jar c:\saxon\saxon9ee.jar -s:"C:\Sourcepath" -o:"C:\Resultpath" -xsl:"C:\Xslpath.xsl" -outval:recover
>
> Maria
>
>
>
>
> ------------------------------------------------------------------------------
> Try New Relic Now & We'll Send You this Cool Shirt
> New Relic is the only SaaS-based application performance monitoring service
> that delivers powerful full stack analytics. Optimize and monitor your
> browser, app, & servers with just a few lines of code. Try New Relic
> and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may_______________________________________________
> saxon-help mailing list archived at http://saxon.markmail.org/
> saxon-help@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/saxon-help


------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
saxon-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/saxon-help

------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
saxon-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/saxon-help