sorry I can't follow your problem description, it would be easier if you
had a small sample input doc, abd a small sample required output.
You did give a sample of your template document, but it wasn't well
formed
<Templates>
<div id='1' Tag='stuff1'>
<span
</div>
where does that span close??
<div id='2' Tag='stuff2?>
</div>
attribute values have to be surrounded by ' or " but stuff2 (and all
your examples except stuff1) have a ' on the left and byte 146
on the right, which is neither ' nor ".
David
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list