Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
XML
data.xmlanalysis
mappoint.webservice
msf
msxml-webrelease
netmyservices.sdk
passport.sdk
soap
soapsdk
uddi.general
uddi.programming
uddi.specification
xml
xmlsqlwebrelease
xsl
  
 
date: Wed, 25 Jun 2008 14:36:17 -0500,    group: microsoft.public.xml        back       


How to call another transform xsl from inside the current transform?   
Hi all,

I'm transforming an xml document into another xml by using a xsl 
transformation by using
<xsl:value-of select="root/@someAttrib" />.
My problem arises when one of the values I'm inserting in the new document 
should be obtained from another xslt transformation defined in another 
(third) file. How can I obtain the value of another transform to use this 
inside my transform...?
It sounds a little weird but I need something like
<xsl:value-of select="anotherXsltFile.xsl applied to this xml" />.

Any hint is welcomed
Thanks in advance
Sammy
date: Wed, 25 Jun 2008 14:36:17 -0500   author:   SammyBar

Re: How to call another transform xsl from inside the current transform?   
"SammyBar"  wrote in message 
news:#xPs#qv1IHA.3756@TK2MSFTNGP04.phx.gbl...
> Hi all,
>
> I'm transforming an xml document into another xml by using a xsl 
> transformation by using
> <xsl:value-of select="root/@someAttrib" />.
> My problem arises when one of the values I'm inserting in the new document 
> should be obtained from another xslt transformation defined in another 
> (third) file. How can I obtain the value of another transform to use this 
> inside my transform...?
> It sounds a little weird but I need something like
> <xsl:value-of select="anotherXsltFile.xsl applied to this xml" />.
>
> Any hint is welcomed
> Thanks in advance
> Sammy
>
>
You can use the document function to retrieve an external file. So one way 
would be a service that returns your transformed file. For example:

http://myServer.com/dotransform?xml=file1.xml&xsl=file2.xslt


-- 

Joe Fawcett (MVP - XML)
http://joe.fawcett.name
date: Thu, 26 Jun 2008 08:33:56 +0100   author:   Joe Fawcett am

Re: How to call another transform xsl from inside the current transform?   
SammyBar wrote:

> I'm transforming an xml document into another xml by using a xsl 
> transformation by using
> <xsl:value-of select="root/@someAttrib" />.
> My problem arises when one of the values I'm inserting in the new document 
> should be obtained from another xslt transformation defined in another 
> (third) file. How can I obtain the value of another transform to use this 
> inside my transform...?
> It sounds a little weird but I need something like
> <xsl:value-of select="anotherXsltFile.xsl applied to this xml" />.

Saxon has an exension function
http://www.saxonica.com/documentation/extensions/functions/transform.html

Which XSLT processor are you using? With MSXML or XslCompiledTransform 
it might be possible to implement an extension function similar to the 
one Saxon has, using the msxsl:script element
http://msdn.microsoft.com/en-us/library/ms256042(VS.85).aspx


-- 

	Martin Honnen --- MVP XML
	http://JavaScript.FAQTs.com/
date: Thu, 26 Jun 2008 13:44:21 +0200   author:   Martin Honnen

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us