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

RE: Subsection Formatting

Subject: RE: Subsection Formatting
From: "Jack Cane" <jwcane@xxxxxxxxxxx>
Date: Fri, 28 Jun 2002 15:24:30 -0400
xsl template match subsection
Yes, I missed those changes. All works now. Thanks a lot.

jwc

-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Joerg
Heinicke
Sent: Friday, June 28, 2002 10:08 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx; jwcane@xxxxxxxxxxx
Subject: Re:  Subsection Formatting


If I read my mail correctly, I changed the XSL code a bit more ;-)

http://sources.redhat.com/ml/xsl-list/2002-06/msg01473.html

Instead of your SubSection template add these templates:

<xsl:template match="SubSection">
   <xsl:apply-templates/>
</xsl:template>

<xsl:template match="ssHdr">
   <h3><xsl:apply-templates/></h3>
</xsl:template>

<xsl:template match="TextPara">
   <p><xsl:apply-templates/></p>
</xsl:template>


or at least these two:

<xsl:template match="SubSection">
   <h3><xsl:apply-templates/></h3>
   <xsl:apply-templates select="TextPara/>
</xsl:template>

<xsl:template match="TextPara">
   <p><xsl:apply-templates/></p>
</xsl:template>

Regards,

Joerg


Jack Cane wrote:
> Joerg,
>
> Following your suggestion, I changed all value-of to apply-templates. The
> free-text paragaraphs are still run together with the subsection title.
>
> In .DTD, ssHdr is declared in the subsection element, thus:
>
> ========================
>
>   <!ELEMENT SubSection (ssHdr, TextPara+)>
>     <!ELEMENT ssHdr (#PCDATA)>
>     <!ELEMENT TextPara (#PCDATA)>
>
>   <!ELEMENT Introduction (IntroTitle, ProbStmt)>
>     <!ELEMENT IntroTitle (SectHdr)>
>     <!ELEMENT ProbStmt (SubSection)>
>
> ========================
>
> In .XSL, the subsection os formatted thus:
>
> ========================
>
>   <xsl:template match="SubSection">
>     <h3><xsl:apply-templates select="ssHdr"/></h3>
>     <p><xsl:apply-templates select="TextPara"/></p>
>   </xsl:template>
>
>   <xsl:template match="Introduction">
>     <html>
>       <head>
>         <title>
>           <xsl:apply-templates select="IntroTitle"/>
>         </title>
>         <link rel="stylesheet" href="novabasic.css" type="text/css"/>
>       </head>
>       <body>
>         <h2 align="center"><xsl:apply-templates select="IntroTitle"/></h2>
>         <xsl:apply-templates select="ProbStmt"/>
>       </body>
>     </html>
>   </xsl:template>
>
> ========================
>
> As you pointed out, I took out the extra formatting of ssHdr, which is a
> part of the SubSection declaration. That leaves only ProbStmt, which is a
> subsection.
>
> In the subsection only one textpara is declared, but the DTD allows
multiple
> instances of textpara, so I assume that is ok too.
>
> in .XML the subsection ProbStmt is declared thus:
>
> ========================
>
> <Introduction>
>   <ProbStmt>
>     <ssHdr>
> 	Problem Statement
>     </ssHdr>
>     <TextPara>
> 	This research defines...
>     </TextPara>
>     <TextPara>
>       Decisions made...
>     </TextPara>
>     <TextPara>
>       Subjective assessments...
>     </TextPara>
>   </ProbStmt>
> </Introduction>
>
> ========================
>
> When viewed in the browser, the xml still displays the subsection header
and
> all three paragraphs as one unformatted block of text.
>
> tks,
>
> jwc


--

System Development
VIRBUS AG
Fon  +49(0)341-979-7419
Fax  +49(0)341-979-7409
joerg.heinicke@xxxxxxxxx
www.virbus.de


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list




 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.