This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
FW: Subsection Formatting
- From: "Jack Cane" <jwcane at enw-ltd dot com>
- To: "aaxslList Post" <XSL-List at lists dot mulberrytech dot com>
- Date: Fri, 28 Jun 2002 07:33:39 -0400
- Subject: [xsl] FW: Subsection Formatting
- Reply-to: xsl-list at lists dot mulberrytech dot com
Please forward any reply already sent. It may have been deleted by my system
due to a bad mailbox setting.
tks,
jwc
-----Original Message-----
From: Jack Cane [mailto:jwcane@enw-ltd.com]
Sent: Thursday, June 27, 2002 10:27 PM
To: XSL-List@lists.mulberrytech.com
Subject: Subsection Formatting
I'm quite new at xml/xslt. Have created a dtd and style sheet which work, to
a point. The problem is with separation and formatting of subsection
elements. At present the subsection title and all text paragraphs are in one
paragraph.
Would appreciate some feedback on where I am going wrong here.
========================================
Here is the xsl content:
<?xml version = "1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="dissertation.dtd"
xmlns:html="http://www.w3.org/1999/xhtml"
version="1.0">
<xsl:template match="SubSection">
<h3><xsl:value-of select="ssHdr"/></h3>
<p><xsl:value-of select="TextPara"/></p>
</xsl:template>
<xsl:template match="Introduction">
<html>
<head>
<title>
<xsl:value-of select="IntroTitle"/>
</title>
<link rel="stylesheet" href="novabasic.css" type="text/css"/>
</head>
<body>
<h2 align="center"><xsl:value-of select="IntroTitle"/></h2>
<xsl:value-of select="ProbStmt"/>
<h3><xsl:value-of select="ssHdr"/></h3>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
========================================
And here is the relevant part of the dtd:
<!ELEMENT SubSection (ssHdr, TextPara+)>
<!ELEMENT ssHdr (#PCDATA)>
<!ELEMENT TextPara (#PCDATA)>
<!ELEMENT Section (SectHdr, SubSection+)>
<!ELEMENT SectHdr (#PCDATA)>
<!ELEMENT SubSect (SubSection)>
<!ELEMENT Chapter (ChapHdg, Section+)>
<!ELEMENT ChapHdg (#PCDATA)>
<!ELEMENT Sect (Section)>
<!ELEMENT Introduction (IntroTitle, ProbStmt)>
<!ELEMENT IntroTitle (SectHdr)>
<!ELEMENT ProbStmt (SubSection)>
========================================
tks,
jwc
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list