|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Matching namespaces on source documents
Do both XT or LotusXSL fail to process namespaces from the source document, or (more likely) is my source document not declaring the namespaces properly? I have the following stylesheet: <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml"/> <xsl:template match="/"> <xsl:apply-templates/> </xsl:template> <xsl:template match="test:foo"> <TEST.FOUND/> </xsl:template> <xsl:template match="*" priority="-1.0"> <TEST.MISSED/> </xsl:template> </xsl:stylesheet> My source document is: <?xml version="1.0"?> <document xmlns:test="http://www.test.org"> <test:foo>Element foo with namespace test</test:foo> <document> When I use XT to apply the stylesheet to the document, I get an error message: test.xsl:13: undefined prefix where line 13 is the tempate trying to match xsl:foo. I have also tried LotusXSL, which requires changing the xsl declaration to <xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0"> but this generates a Java runtime exception. The message in the stack dump says there was an ElemTemplateError: cannot resolve namespace prefix: test. What am I doing wrong? Jeremy 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
|

Cart








