[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: where to put the filter?
At 10:43 AM 10/04/2000 -0500, Keith wrote:
...When I call the transformXML() function after the alerts the page comes back blank. I am placing this strFilter in the <filter></filter> tags when the SOAP request is sent. I am sure it's because I am placing the Not sure if this will help or not.... An xsl:template is always a top-level element, i.e. a child of the xsl:stylesheet element. xsl:apply-templates sends the XSLT processor off on a hunt for template rules (explicit or built-in) for children of the context node established by the <xsl:template match="..."> pattern; assuming it finds any such template rules, the processor handles them at that point in the containing template. xsl:value-of inserts *content* from the source doc into a template, so it too is a descendant of xsl:template. So given a source document like this: <rootelem title="MyRoot"> <childelem>child1</childelem> <childelem>child2<grandchildelem>grandkid</grandchildelem></childelem> </rootelem> you might have a template rule like this: <xsl:template match="/rootelem"> <newrootelem> <xsl:value-of select="@title"/> <xsl:apply-templates /> </newrootelem> </xsl:template> See? xsl:template contains both xsl:value-of and xsl:apply-templates. The result tree will contain: <newrootelem> MyRoot child1 child2 grandkid </newrootelem> [Now comes the part where Evan jumps in and qualifies all the above. :)] ========================================================== John E. Simpson | "Curiosity killed the cat, http://www.flixml.org | but for a while I was a XML Q&A: http://www.xml.com | suspect." (Steven Wright) 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
|