Subject: [xsl] Processing single tag inside mixed complex element From: "Ignacio Garcia" <igcxslt@xxxxxxxxx> Date: Mon, 7 May 2007 14:58:56 -0400 |
I have a complex element that resembles some HTML elements inside it, so it can be used as a text field with HTML-like tags allowed for formatting. The HTML elements allowed are br, p, i, b, a (with href). This element type (notesText) is used inside several places of my schema.
If I want to use XSLT to show the "description" element, I just use <xsl:copy-of select="./descripton/node()" /> and everything perfect on the output and everything works as expected with the HTML like elements working on the HTML output.
HOWEVER, I also have an special element inside this notesText complexType. The element is called fddLink. The fddLink is a mixed complex type that has one attribute called ID.
If I output the contents of description directly when containing and fddLink element, I need to process this fddLink and transform it into an anchor element. I could use the ANCHOR element directly, but since fddLink refers to an special link, it has to be represented differently in the XML.
My question is... is there any way to process this fddLink element inside a description element and mantain it's position and all the other HTML like tags working??
Here is an example of how a description would look like in XML: --- <description> Here is a description, that can contain <b>bold text>, with page breaks<br /><br /> And also <a href="foo.com">links</a>. With an <fddLink id="fdd0000232">special link</fddLink> on it. </description> ---
The output should be like this: ---- Here is a description, that can contain <b>bold text>, with page breaks<br /><br /> And also <a href="foo.com">links</a>. With an <a href="fdd0000232.html">special link</a> on it. ----
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Simple template matching , Abel Braaksma | Thread | RE: [xsl] Processing single tag ins, Michael Kay |
Re: [xsl] Simple template matching , Steve | Date | RE: [xsl] Processing single tag ins, Michael Kay |
Month |