--- W. Eliot Kimber wrote:
I'm trying to implement support in my FO style sheet for Epic
Editor's
change tracking markup. This markup is in a unique name space and may
be
wrapped around any element or text to indicate whether the element is
added or deleted.
Within the scope of paragraphs it's not a big deal because the
processing in that context is pretty simple. But above the paragraph
level it gets pretty funky because the presence of the wrappers will
throw off match statements. I could of course add match options that
include the Epic change tracking elements, and would do so if that
were
the end of it. Unfortunately, I also want to do different processing
based on the interaction of the change tracking markup and a
parameter
that's passed in (reflecting the "view change tracking" setting in
Epic
itself).
I can't think of an elegant solution to this sort of problem. An easy
solution would be to have the XPath matches simply ignore elements in
a
particular name space, but I don't think that's possible. That would
at
least keep the base transform working whether the wrappers were there
or
not. But it wouldn't solve the larger problem of explosion of matches
and templates.
I'm wondering if there's a general pattern for approaching this type
of
markup other than the brute force method?
Thanks,
Eliot
--
W. Eliot Kimber, eliot(_at_)NO-SPAM(_dot_)isogen(_dot_)com
Consultant, ISOGEN International
Hi Eliot,
You would not have such big problems, in case Epic did not use
wrappers, but just a simple attribute belonging to their namespace.
Therefore, if I were in your place, I would try a two-phase approach:
1. Convert the Epic editor's markup into an intermediate one, where
changes are tracked in attributes (or why not even get rid completely
of Epic's "added value").
2. Perform my regular transformation on the standard XML structure
(just ignoring or copying the tracking attributes)
3. (Only if necessary) convert the result back to Epic's wrappers.
=====
Cheers,
Dimitre Novatchev.
http://fxsl.sourceforge.net/ -- the home of FXSL
__________________________________________________
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list