[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: How To Map From Hierarchy to Wrapped Text Sequence

Subject: Re: How To Map From Hierarchy to Wrapped Text Sequences?
From: Eliot Kimber <ekimber@xxxxxxxxxxxx>
Date: Thu, 10 Apr 2008 10:18:50 -0500
Re:  How To Map From Hierarchy to Wrapped Text Sequence
That's so crazy it just might work.

Actually, I can't think of any obvious reason why it wouldn't work. Just use tunnel parameters to pass in the current style context and hey presto.

I'll give it a try.

Cheers,

Eliot

G. Ken Holman wrote:
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()">
    <txsr>
       <!--check ancestry for attributes-->
       <pcnt>
          <!--check ancestry for attributes-->
          <xsl:value-of select="."/>
       </pcnt>
    </txsr>
  </xsl:template>

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.



-- Eliot Kimber Senior Solutions Architect "Bringing Strategy, Content, and Technology Together" Main: 610.631.6770 www.reallysi.com www.rsuitecms.com

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.