I've been going around and around for hours on this. I'm trying to import an XML file that describes a static menu into a custom XML package and transform it to HTML.
Here's the innards of my XML package:
Code:
<xsl:template match="/">
<xsl:copy-of select="document('menuDataBootstrap.xml')" />
<xsl:value-of select="document('menuDataBootstrap.xml')" />
<xsl:apply-templates select="bootstrapmenu" />
</xsl:template>
<xsl:template match="bootstrapmenu">
<li>MENU HOLY CRAP WITHIN BOOTSTRAPMENU TAMPLATE!</li>
<xsl:for-each select="level1">
... etc.
</xsl:template>
And here's the XML file:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<bootstrapmenu>
<level1 Text="Home" NavigateNavigateUrl="default.aspx?skinid=2">
</level1>
<level1 Text="Instruments" NavigateUrl="c-2-instruments.aspx?skinid=2">
<level2 Text="Steel String Guitars" NavigateUrl="c-3-steel-string-guitars.aspx?skinid=2"/>
</level1>
... etc.
</bootstrapmenu>
Problem is, the XML package pulls in the XML, but it gets written into an xfrm.xml.config file, called bootstrapmenu.xml.config_store.xfrm.xml. It's not getting written into the store.runtime.xml file, which I think it should be. The result? The XML file I want to pull in is not getting transformed into HTML. I just get a blank HTML output on my site.
(I've also tried embedding C# into my template.ascx to do the XSL transformation of the XML, but having trouble doing that. I'd like to avoid touching TemplateBase.cs, too, if at all possible.)
This is crazy! Seems like it should be so easy to just import an XML document into the XML package and transform it using XSL inside the XML package. If I use this code, though, it crashes the server:
Code:
<xsl:apply-templates select="document('menuDataBootstrap.xml')" />
Help is much appreciated! I'm practically tearing out my hair over this!