[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] : How to handle two XML sources in one style sheet
Hello- I have an Active Server Page which pulls XML from our database then loads a style sheet and transforms it to produce the final html. Currently, the page has a menu on the left hand side of the page. I would like to make this menu dynamic like the page content. However, the menu XML is not part of the content XML. This has been causing me problems. How to I create the left side of the page with one string of XML data and the right side of the page with another string of XML data from the same style sheet? I want to have the menu template in another file so it can be included in many other stylesheets. Below is my code that calls the page's content XSL and transforms it. I hope I didn't confuse anyone. Thanks - Jeremy <%@ Language=JavaScript%> <%Response.Buffer = true%> <html> <head> <title>Fake</title> </head> <body text="#000000" vlink="#993399" link="#003399" bgcolor="#999999" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0"> <form action="MyPage.asp" method="get" name="frmThis"> <% var xmlDocument; var xslDocument; xmlDocument = Server.CreateObject("MSXML2.DOMDocument"); xslDocument = Server.CreateObject("MSXML2.DOMDocument"); xmlDocument.async = false; xslDocument.async = false; // This is the right side of the page XML. It will come from a COM object pulling // data from a database xmlDocument.loadXML("<?xml version=\"1.0\"?><Fakes><Fake>Fake</Fake></Fakes>"); xslDocument.load(Server.Mappath("MyPage.xsl")); Response.Write(xmlDocument.transformNode(xslDocument)); %> </form> </body> </html> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|