Print

Print


In generality, I don't think you can effectively
transform to <ins>...</ins>, for the same reasons
that it's a milestone in TEI, viz that it may cross
hierarchical boundaries in HTML as well; you probably
have <div> or <span> elements in there.

so of your choices:

  > (a) duplication of lots of templates and using mode;
  > (b) adding an argument to lots of templates;

I'd say these on their own will get pretty much too complicated

 > (c) adding a preprocessing step to transform addSpan from a milestone 
back into an add-like structure; or
 > (d) using a result-tree fragment (which would require xsl 2.0, which 
we're not using)

these are the same technique, just implemented in different places.
You _could_ use exsl:node-set if you are using libxslt, but you
may not want to be tied to that

there is also

    e) use disable-output-escaping

but that's probably going to bite you one day.

I think I'd go for a post-processing/second pass in the XSL
whose only job is to add in appropriate HTML class attribute
to elements within the scope of the addSpan, and construct new
<span> elements for trailing text.

I bet Martin Holmes has already done this...
-- 
Sebastian Rahtz
Information Manager, Oxford University Computing Services
13 Banbury Road, Oxford OX2 6NN. Phone +44 1865 283431

Sólo le pido a Dios
que el futuro no me sea indiferente