Subject: RE: [xsl] import entire tags From: Johannes.Becker@xxxxxx Date: Fri, 17 Jan 2003 13:34:08 +0100 |
Thank you all. Works fine. Minor "source code"-problem: But my XML data gets "produced" in an XSP-page in cocoon, and gets retrieved from there. The page source looks now like this: ... <option xmlns:xspdoc="http://apache.org/cocoon/XSPDoc/v1" xmlns:esql ="http://apache.org/cocoon/SQL/v2" xmlns:xsp="http://apache.org/xsp" xmlns:xsp-request="http://apache.org/xsp/request/2.0" value ="17">blabla</option> Is there a simple way (I mean "short code") to avoid this kind of output? Thanks Jonny |---------+----------------------------> | | | |---------+----------------------------> >------------------------------------------------------------------------------------------------------------------------------| | | >------------------------------------------------------------------------------------------------------------------------------| Something like this should be working.. See xsl:copy-of instruction. | <select name="hello> <xsl:for-each select="hello/option"> | <xsl:value-of select="."/> | </xsl:for-each> | </select> Element: <copy-of> attributes: select Standard excerpt: The xsl:copy-of element can be used to insert a result tree fragment into the result tree, without first converting it to a string as xsl:value-of does (see [7.6.1 Generating Text with xsl:value-of]). The required select attribute contains an expression. When the result of evaluating the expression is a result tree fragment, the complete fragment is copied into the result tree. When the result is a node-set, all the nodes in the set are copied in document order into the result tree; copying an element node copies the attribute nodes, namespace nodes and children of the element node as well as the element node itself; a root node is copied by copying its children. When the result is neither a node-set nor a result tree fragment, the result is converted to a string and then inserted into the result tree, as with xsl:value-of. | -----Original Message----- | From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx | [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of | Johannes.Becker@xxxxxx | Sent: vrijdag 17 januari 2003 12:32 | To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx | Subject: [xsl] import entire tags | | | Hi, | | I have for example an xml-file: | | ... | <hello> | <option value="1">yo1</option> | <option value="2">yo2</option> | <option value="3">yo3</option> | ... | </hello> | ... | | And I want to import the entire <option>-tags (<option value | ="1">yo1</option>) in my xsl. | Is this possible without using <xsl:atrribute>? | | For example the xsl: | <select name="hello> | <xsl:for-each select="hello"> | <xsl:value-of select="The entire option tag | without using xsl:atrribute"/> | </xsl:for-each> | </select> | | so I get an output like this: | <select name="hello> | <option value="1">yo1</option> | <option value="2">yo2</option> | <option value="3">yo3</option> | ... | </select> | | Is this possible in one tag? | | Thanks | Jonny | -------------------------------------------------------------- | -------------------------------------- | | This electronic message contains information from the mmo2 | plc Group which may be privileged or confidential. The | information is intended to be for the use of the | individual(s) or entity named above. If you are not the | intended recipient be aware that any disclosure, copying, | distribution or use of the contents of this information is | prohibited. If you have received this electronic message in | error, please notify us by telephone or email (to the numbers | or address above) immediately. | | | | | XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list | | XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] import entire tags, Jarno . Elovirta | Thread | Re: [xsl] import entire tags, J.Pietschmann |
RE: [xsl] calling extension java fu, Cams Ismael | Date | [xsl] encoding, Stevenson Ngila |
Month |