[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Param with namespace problem!
Hi, List There is a problem when I pass the value with namespace prefix to xsl:param, the structure of xml is: ------------------ <Temsis> <WebPages> <Home>...</Home> <Report>...</Report> ... </WebPages> </Temsis> ------------------ the xsl file I used is: ------------------------------------------------ <xsl:stylesheet version="1.0" xmlns:t="http://www.dfki.de/Temsis" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xlink="http://www.w3.org/TR/xlink"> <xsl:param name="target" select="t:Home"/> <xsl:template match="/"> <html><head/> <body > <xsl:apply-templates select="t:Temsis"/> </body> </html> </xsl:template> <xsl:template match="t:Temsis"> <xsl:apply-templates select="t:WebPages" /> </xsl:template> <xsl:template match="t:WebPages"> <xsl:apply-templates select="$target"/> <!-- I want to select the node "t:Home" --> </xsl:template> other templates... ---------------------------------------------- 1, With this stylesheet, I can't get the page "Home". of course, It's no problem if I change the select in the template to be: select="t:Home" 2, If I change the value of 'target' to be: "'t:Home'", it failed to transform for "Reference to parameter 'target' must evaluate to a node list". 3, If I change the value of 'target' to be: "'Home'", and write the select as: select="t:$target" , it came a expression error( expected token 'eof' found ':') . I don't know how to solve it. Regards, Qinghui 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
|