[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Merging a main xsl file and a referenced xsl file

Subject: 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)
xmlns error
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.