[xsl] Merging a main xsl file and a referenced xsl file

Subject: [xsl] Merging a main xsl file and a referenced xsl file
From: Sean <srguard2000-triallicense@xxxxxxxxxxx>
Date: Mon, 23 Jan 2006 09:30:04 +0000 (GMT)
Hello,

I am using some third party XSL, which has a main XSL file and a referenced XSL file.
I would like to re-write it so it is only in 1 xsl file.

This is mainly so I can test it in MSXML6 and libxslt, as I cannot seem to get these processors
working with referenced xsl files.

So I would like to know how to rewrite the use of the document() function below,
so that it would instead refer to <Error:rule ...> inside the main XSL file.

Hope this makes sense!

Thanks,

Sean


////////////////////////////////////////////////////////
//The main XSL file:

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:Error="Errors.uri"
exclude-result-prefixes="Error">

...

<xsl:value-of select="document('.\SchoolCensus06-ErrorList-v1.4.xsl')/xsl:stylesheet/Error:rule[
@number=$err_num]/@type"/>

...

</xsl:stylesheet>

///////////////////////////////////////////////////////
//Inside the error list xsl file:

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:Error="Errors.uri"
exclude-result-prefixes="Error">

  <Error:rule number="1430" outputno="1430" term="SPR SUM AUT" type="Error" message="UPN missing"
/> 

...

</xsl:stylesheet>

////////////////////////////////////////////////////////
//merging into one xsl file:

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:Error="Errors.uri"
exclude-result-prefixes="Error">
...
<Error:rule number="1430" outputno="1430" term="SPR SUM AUT" type="Error" message="UPN missing" />

...

<!-- Question - how do we refer to <Error:rule> inside of this xsl stylesheet ? -->
<xsl:value-of select="document('.\SchoolCensus06-ErrorList-v1.4.xsl')/xsl:stylesheet/Error:rule[
@number=$err_num]/@type"/>
...
</xsl:stylesheet>



___________
Sean Ryan

___________
Sean Ryan

Current Thread