Altova Mailing List Archives

Re: [xsl] How To Map From Hierarchy to Wrapped Text Sequences?

From: "G. Ken Holman" <gkholman@-------------------->
Date: 4/10/2008 3:16:00 PM
At 2008-04-10 09:42 -0500, Eliot Kimber wrote:
<p>Some text <i>italic text <b>now bold italic</b> back to 
italic</i> more text</p>

In the INCX representation of this, each text string with distinct 
formatting is separately wrapped as a "text run", making the above into:

<txsr><pcnt>Some text </pcnt></txsr>
<txsr><pcnt>italic text </pcnt></txsr>
<txsr><pcnt>now bold italic</pcnt></txsr>
<txsr><pcnt> back to italic</pcnt></txsr>
<txsr><pcnt> more text& #x0a;</pcnt></txsr>

(INCX details omitted for simplicity)

An INCX file is essentially just a long sequence of txsr elements.

Doesn't the following address this for you implicitly:

  <xsl:template match="text()">
       <!--check ancestry for attributes-->
          <!--check ancestry for attributes-->
          <xsl:value-of select="."/>

Granted looking up the ancestry is slow, but using XSLT 2 you could 
stuff tunnel parameters with cues and then check tunnelled values to 
know what ancestry has been encountered ... that speeds things up tremendously.

I hope this helps, or at least gives a direction to look in.

. . . . . . . . . . . Ken

Upcoming:  UBL Apr.22,24; genericode code lists Apr.23; Rome,Italy
World-wide corporate, govt. & user group XML, XSL and UBL training
RSS feeds:     publicly-available developer resources and training
G. Ken Holman                 mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
Crane Softwrights Ltd.
Box 266, Kars, Ontario CANADA K0A-2E0    +1(613)489-0999 (F:-0995)
Male Cancer Awareness Nov'07
Legal business disclaimers:


These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.