| Subject: [xsl] Subsection Formatting From: "Jack Cane" <jwcane@xxxxxxxxxxx> Date: Fri, 28 Jun 2002 09:48:40 -0400 | 
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
 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
| Current Thread | 
|---|
| 
 | 
| <- Previous | Index | Next -> | 
|---|---|---|
| Re: [xsl] Subsection Formatting, Joerg Heinicke | Thread | Re: [xsl] Subsection Formatting, Joerg Heinicke | 
| Re: [xsl] How to throw transformati, Antonio Fiol | Date | Re: [xsl] Subsection Formatting, Joerg Heinicke | 
| Month |