Subject: Debugging.... Conditionally including XML From: "Mirick, John" <jmirick@xxxxxxxxxxxx> Date: Fri, 10 Nov 2000 08:28:37 -0500 |
This might be more of an XML related question than XSL... My XML file looks something like this <page> <content> <dataReference name="test" /> </content> <data> <item name="test">This is a data value</item> </data> </page> I write the content part of the page by hand and the data portion is returned to me. Within my xsl I might have something like this <xsl:template match="dataReference"> <xsl:variable name="referenceName"><xsl:value-of select="@name" /></xsl variable> <xsl:value-of select="/page/data/item[$referenceName = @name]" /> </xsl:template> What I would like to know is if there is any way to conditionally add XML to my XML document. Im looking for a way to be able to debug the XML/XSL before the data section of the XML document is being populated by the backend/middle tier developers. Currently how I do this is just write the data section of the page and either remove it or comment it out when Im actually getting data. Im getting sick of commenting and un-commenting stuff (and I cant count the number of times we have checked in an XML file to source control with the data section still uncommented). It is just a general annoyance but I would like to fix it if I could. I would like to be able to do something like this in my XML file... <page> <content>....</content> if (debug = true) Include a debug data file, which would contain the data and item tags else The data and item tags will be returned to me. </page> Thanks John XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: XML and text declarations (was , Kay Michael | Thread | Re: Debugging.... Conditionally inc, Jeni Tennison |
RE: Efficient Stylesheets for reord, Kay Michael | Date | R: XSL:FO editor, Carlo Brigatti |
Month |