[xsl] Entering invalid XML in XSLT or how to structure a rule?

Subject: [xsl] Entering invalid XML in XSLT or how to structure a rule?
From: Mary McRae <marymcrae@xxxxxxxxxxxxx>
Date: Tue, 09 Sep 2003 10:00:03 -0400
 
I have come across a situation where I need to be able to enter markup
that will be considered invalid in the XSLT file, but will result in
valid markup in my result file. 

This is basically because WordML does not support nesting paragraphs,
yet many DTDs/schemas consider bulleted lists to be part of the
paragraph (as is grammatically/structurally correct). So if I have a
para that contains a bullist, I need to end the WordML para and then
start a new one for each list item; at the end of the list I need to
insert a WordML start para.

Is there some way to enter such markup, or alternatively, is there
some way to build a template that will look ahead to see if the para
contains any of the possible list markup types so I can have an
alternate rule where I can map everything in a valid structure?

Sample XML:
<para>This is a para. It contains the following:
	<randlist>
		<li><para>First bulleted item</li></para>
		<li><para>Second bulleted item</li></para>
	</randlist>
And the summation of the para.</para>

Thanks for any and all assistance!

Mary


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread