cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jay" <>
Subject Two simple xsl copy questions
Date Thu, 29 Mar 2001 18:19:33 GMT

I have an XML structure such as:

		<a href="go.xml?id=1">a</a>
		<a href="go.xml?id=2">b</a>
		<a href="go.xml?id=3">c</a>

How, with XSL, do I pass the full element (a) through processing so that the
resulting HTML uses the <a> tags directly (complete with its value and

I've tried:

<xsl:template match="test2">
	<xsl:for-each select="a">

as was described in the XSLT docs, but it doesn't pass the element, it's
attributes, and it's value.

The second question is, if I try to dynamically create the list of <a> tags
in the <test2> with xsp in the first xslt, then the for-each doesn't work at
all in the second xslt.  I'm guessing this has something to do with the
first (dynamic) xslt process is producing an xml stream:

<test2><a href="go.xml?id=1">a</a><a href="go.xml?id=2">b</a><a

without carraige returns?  I can do a template match on <test2>, but
applying templates within that to match on the <a>'s go unnoticed.  Why is
this and how do I fix it?


Please check that your question has not already been answered in the
FAQ before posting. <>

To unsubscribe, e-mail: <>
For additional commands, e-mail: <>

View raw message