xsl-list
[Top] [All Lists]

[xsl] Processing single tag inside mixed complex element

2007-05-07 11:59:24
Hello,

I have the following situation:

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.

For example, one element that is of type notesText is "description".

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.
----

Thank you.

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>