Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: post into xslt to change the outcome

From: "Dimitre Novatchev" <dimitren@---.---.-->
To: NULL
Date: 11/2/2006 7:11:00 AM

Here's the example from the MSXML4 SDK -- you must have this documentation!

      mk:@MSITStore:C:\Program%20Files\MSXML%204.0\doc\xmlsdk4.chm::/htm/xml_mth_ac_5pgy.htm
Dim xslt As New Msxml2.XSLTemplate40
Dim xslDoc As New Msxml2.FreeThreadedDOMDocument40
Dim xmlDoc As New Msxml2.DOMDocument40
Dim xslProc As IXSLProcessor
xslDoc.async = False
xslDoc.resolveExternals = False
xslDoc.Load "sample.xsl"
Set xslt.stylesheet = xslDoc
xmlDoc.async = False
xmlDoc.resolveExternals = False
xmlDoc.Load "books.xml"
If (xmlDoc.parseError.errorCode <> 0) Then
   Dim myErr
   Set myErr = xmlDoc.parseError
   MsgBox("You have error " & myErr.reason)
Else
   Set xslProc = xslt.createProcessor()
   xslProc.input = xmlDoc
   xslProc.addParameter "param1", "Hello"
   xslProc.Transform
   MsgBox xslProc.output
End IfFile Name: Sample.xsl

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
version="1.0">
   <xsl:output method="html"/>
   <xsl:param name="param1"/>
  <xsl:template match="/">
      The parameter value was: <xsl:value-of select="$param1"/>
  </xsl:template>
</xsl:stylesheet>


Cheers,
Dimitre Novatchev

<nickjtew@g...> wrote in message 
news:1162466147.534451.218730@h......
> Hi,
>
> Thanks for the reply.
>
> I am using asp pages to show the xml with xslt (i can have more than
> one xml on the page then). So a normal url will be
> http://xxx.com/blah.asp?articleid=15646
>
> The code i use on the asp page to transform the xml/xslt is
>
> <%
> xmlf = "feeds/articles.xml"
> stylef = "xsl/article.xsl"
> set xmlDoc = Server.CreateObject("Microsoft.XMLDOM")
> set xslDoc = Server.CreateObject("Microsoft.XMLDOM")
> xmlDoc.load(Server.Mappath(xmlf))
> xslDoc.load(Server.Mappath(stylef))
> Response.Write(xmlDoc.transformNode(xslDoc))
> %>
>
> Does this help? Could i pass the needed information in using asp?
>
> Thanks
> Nick
> 




transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent