How to create XSL file dynamically ?

Results 1 to 2 of 2

Thread: How to create XSL file dynamically ?

  1. #1
    DILIP Guest

    Default How to create XSL file dynamically ?

    I have created an XML file dynamically using an asp program through DOM statements.<BR>Can i create the XSL file also for that XML file dynamically?<BR>If yes,what should i do ?<BR><BR>Please help .<BR>Thanks in advance.

  2. #2
    Join Date
    Dec 1969

    Default RE: How to create XSL file dynamically ?

    Well, theoretically you could create a stylesheet dynamically through the DOM, but that would be tricky (or at least, I find using namespaces in the DOM tricky). I&#039;d do it through concatenation of strings, as in:<BR><BR>strXSL = "&#060;?xml version=""1.0""?&#062;"<BR>strXSL = strXSL & "&#060;xsl:stylesheet version=""1.0"" xmlns:xsl=""""&#062;"<BR>strXSL = strXSL & "&#060;xsl:template match=""/""&#062;"<BR>strXSL = strXSL & "&#060;/xsl:template&#062;"<BR>strXSL = strXSL & "&#060;/xsl:stylesheet&#062;"<BR><BR>Then you could load that into the DOM object thusly:<BR><BR>Set xslInDOM = Server.CreateObject("MSXML2.DOMDocument")<BR>xslIn DOM.loadXML strXSL<BR><BR>This method is rather time and memory consuming, however. Your best bet might be to look into using a stylesheet with parameters...<BR><BR>Hope that helps,<BR>Mike

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts