To load both the xml-data and the xsl file in rxml you should use the <xsltransformfile/> tag instead.
If I'm not misstaken the xsltransform-tags will force the rxml-parser to do another xsl-pass which is rather time-consuming (depending on several factors). If you are using Roxen CMS consider doing all xsl-parsing in the xsl-templates and, if possible, use the <define> tag to parse xml-data retrieved in the rxml-parse pass. See the <define> tags documentation for more info about how to parse xml-data in rxml, typically you could do: <define container="extractNode"> <h1><contents copy-of="myNodedeSet/headerTag"/></h1> <p><contents copy-of="myNodeSet/dataTag"/></p> </define> <cset variable="var.tmp"><insert file="myxml.xml" /></cset> <extractNode>&var.tmp:none;</extractNode> (rember that the insert file tag fetches a parsed file, not necessarily the file as it is stored on disk, also note the :none quoting in the call to extracNode). To loop over nodesets you use the emit tag and the "result-set" attribute to the contents-tag, depending on your solution you could need to nest several define:s to get the desired output. Hope this helps, ask back if you have more questions. /Peter >________________________________ > From: Christopher Howard <[email protected]> >To: [email protected] >Sent: Saturday, July 27, 2013 12:47 AM >Subject: Re: Roxen / XSLT: Import the XML? > > >On 07/26/13 14:31, Rolf Johansson wrote: >> Roxen uses it's own library of different tags, not Apache/Netscape-style >> directives. >> The equiv for include virtual is <insert file="abc.xml" /> >> Take a look at docs.roxen.com for more comprehensive information. >> >> /Rolf >> >> 27 jul 2013 kl. 00:21 skrev Christopher Howard <[email protected]>: >> >>> I just started learning XSLT, and I figured out that I can use this through >>> the xsltransform tag: >>> >>> <nocache> >>> <xsltransform xsl="/arsc/scratch/test.xsl"> >>> ...xml goes here... >>> </xsltransform> >>> </nocache> >>> >>> What do I do if I don't want to put the XML there but instead load it in >>> from another file? I tried an SSI include tag, but that doesn't seem to >>> work here: >>> >>> <nocache> >>> <xsltransform xsl="/arsc/scratch/test.xsl"> >>> <!--#include virtual="test.xml" --> >>> </xsltransform> >>> </nocache> >>> >>> This gives the transform error "Root element missing", which I'm guessing >>> means the include isn't being processed. >>> <cmhoward2.vcf> > >Thanks. This, however, doesn't work here either. It seems that the >insert tag, when used inside the xsltransform, is not replaced with >inserted content, but simply treated as a regular xml tag. (I determined >this by getting a successful match on against the "insert" element >inside the xslt.) > > >
