[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: import entire tags
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: 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
|
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
|