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
"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
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/