On 18/04/07, Michael B Allen <[EMAIL PROTECTED]> wrote:
Can someone recommend how I might transform something like the following:<text:p text:style-name="p_5f_soemthing_else">blah</text:p> <text:p text:style-name="p_5f_prototype">session_start();</text:p> <text:p text:style-name="p_5f_prototype">require_once('foo.php');</text:p> <text:p text:style-name="p_5f_prototype"/> <text:p text:style-name="p_5f_prototype">bool some_function(resource $px,</text:p> <text:p text:style-name="p_5f_prototype"><text:s text:c="8"/>string $ssn_id,</text:p> <text:p text:style-name="p_5f_prototype"><text:s text:c="8"/>array $options=NULL)</text:p> <text:p text:style-name="p_5f_soemthing_else">blah</text:p> <text:p text:style-name="p_5f_prototype">another proto ...</text:p> into the this: <pre>session_start(); require_once('foo.php'); bool some_function(resource $px, string $ssn_id, array $options=NULL)</pre> <pre>another proto ...</pre>
<xsl:template match="text:p[text:style-name="p_5f_prototype"]> <pre> <xsl:value-of select="."/> <xsl:value-of select="following-sibling::text:[EMAIL PROTECTED]:style-name="p_5f_prototype"] [preceding-sibling::*[1][self:text:[EMAIL PROTECTED]:style-name="p_5f_prototype"]]] </pre> </ <xsl:template match="text:p[text:style-name="p_5f_prototype"] /> the downside of a flat structure. HTH -- Dave Pawson XSLT XSL-FO FAQ. http://www.dpawson.co.uk --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
