xsl-list
[Top] [All Lists]

[xsl] Preceding sibling selction

2009-03-03 00:10:18
Hi
I would like to produce the below expected output, How I do select a
BODY, based on the
preceding sibling value .

If it is "text/plain" It should be shown in text area node.
If it is "text/html" and it should be selected and rendered.
I need a help in selecting the testing the preceding sibling . I am
not sure ,How do I escape a "/".

Thanks,
SK

XML message
<BODY>
<Parts>
<MIME>
<Content-Type charset="iso-8859-1">text/plain</Content-Type>
<Content-transfer-encoding>7bit</Content-transfer-encoding>
<BODY>
Here is the text of the message.
</BODY>
</MIME>
<MIME>
<Content-Type charset="iso-8859-1">text/html</Content-Type>
<Content-transfer-encoding>binary</Content-transfer-encoding>
<BODY>
<HTML>
<HEAD></HEAD>
<BODY>
<P>
Here is the html of the message.
</P>
</BODY>
</HTML>
</BODY>
</MIME>
</Parts>
</BODY>

Expected output:

<html>
<div id=htmlForm>
<HTML>
<HEAD></HEAD>
<BODY>
<P>
Here is the html of the message.
</P>
</BODY>
</HTML>
</div>
<div id=textForm>
<textarea id="output" readonly="readonly"rows='30'>
Here is the text of the message.
</textarea>
</div>
<html>

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