xsl-list
[Top] [All Lists]

Merging a main xsl file and a referenced xsl file

2006-01-23 02:30:04
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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>