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

Re: spacing issue

Subject: Re: spacing issue
From: Spencer Tickner <spencertickner@xxxxxxxxx>
Date: Mon, 6 Jun 2005 09:04:34 -0700
replied email green text
Sorry David,

I think you may have been reading my post were I gave the html output,
basically the bad output in xsl comes from these 3 templates.

<!-- This handles the subsection,, a subsection is comprised of a
subsectionnumber and
 subsection text, each may have any number of inline elements -->
      <xsl:template match="subsection" mode="contentsection">
               <xsl:choose>
                       <xsl:when test="parent::section/sectiontext">
                               <p class="sub">(<xsl:apply-templates
select="subsectionnumber"/>)&#xA0; <xsl:apply-templates
select="subsectiontext"/></p>
                       </xsl:when>
                       <xsl:otherwise>
                               <xsl:if
test="not(count(preceding-sibling::*[name()=name(current())])+1
= 1)">
                                       <p class="sub">(<xsl:apply-templates
select="subsectionnumber"/>)&#xA0; <xsl:apply-templates
select="subsectiontext"/></p>
                               </xsl:if>
                       </xsl:otherwise>
               </xsl:choose>
       </xsl:template>

<!-- This is where we handle the subsectionnumber and subsectiontext
for the table of contents, contents and summary page, we basically
apply all inline styles that are allowed for subsectionnumbers and
sectiontext -->
<!--subsectionnumber -->
       <xsl:template match="subsectionnumber">
               <xsl:apply-templates
select="text()|strong|a|graphic|em|sup|sub|u|insert|br|eacute|hr"/>
       </xsl:template>
<!--subsectiontext -->
       <xsl:template match="subsectiontext">
               <xsl:apply-templates
select="text()|strong|a|graphic|em|sup|sub|u|insert|br|eacute|hr"/>
       </xsl:template>

<!-- Here is the insert Inline element. It places the content in green
text to dispaly to the customer that the text is new. it also wraps
the text in an <insert> tag that our content manager uses to index
that the text is considered "new" when performing searches. -->
<xsl:template match="insert"><xsl:element name="{name()}"><xsl:element
name="span"><xsl:attribute
name="class">insert</xsl:attribute><xsl:apply-templates/></xsl:element></xsl:
element></xsl:template>

Ok, there ya go.

Cheers,

Spencer

On 6/6/05, David Carlisle <davidc@xxxxxxxxx> wrote:
>
>   You lost me. The code I replied to had an ,insert explictly in teh
>   template, i just added a template.
>
>
> sorry that's garbled even for me.
>
>
>
> You lost me. The code I replied to had an <insert> explictly in the
> template, I just added an xsl:text.
>
> David
>
> ________________________________________________________________________
> This e-mail has been scanned for all viruses by Star. The
> service is powered by MessageLabs. For more information on a proactive
> anti-virus service working around the clock, around the globe, visit:
> http://www.star.net.uk
> ________________________________________________________________________

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.