Re: namespaces problem - two transformations in one s
> <xsl:template match="/"> > <xsl:apply-templates select="message"/> So it's looking for message elements that are not in a namespace. Since there are none, it won't apply any templates and ends without output. You probably don't even need the selects and just have <xsl:apply-templates/>, which will just apply templates to the children. Barring that, <xsl:apply-templates select="msg:message" /> might get you a little farther since it'll actually look for something in the namespace you want ;). > <xsl:template match="msg:message"> > <xsl:apply-templates select="m_content"/> Again, you match in the proper namespace but apply-templates to elements that are not in a namespace. (Well, it's more complicated than that I believe, but for now you just need to know you're apply templates to elements that are not in the namespace you're thinking of. To help remember this just think of one of the main purposes for namespaces, to avoid collisions. Let's say your input document had two different elements both called foo. Without including the namespace in the apply-templates, how is it supposed to know which namespace you mean? Jon Gorman
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