| Subject: [xsl] Double output From: "Jack Cane" <jwcane@xxxxxxxxxxx> Date: Sun, 9 Mar 2003 16:03:07 -0500 | 
I have the following definition in my .xsd:
  <xs:element name="SubSection">
    <xs:complexType>
	<xs:sequence>
	  <xs:element ref="ssHdr"/>
	  <xs:element ref="TextPara" maxOccurs="unbounded"/>
	</xs:sequence>
    </xs:complexType>
  </xs:element>
...the following in my .xsl:
...and, finally, the following in my .xml:
  <xsl:template match="ssHdr">
  	<h4><xsl:apply-templates/></h4>
  </xsl:template>
  <ProbStmt>
    <SubSection>
      <ssHdr>Problem Statement</ssHdr>
      <TextPara>Some sample text here</TextPara>
    </SubSection>
  </ProbStmt>
When I open the xml file in MSIE 6.28, the subsection header, "Problem
Statement", is correctly rendered. However, the paragraph of text, "Some
sample text here", is printed twice, once as a subsection header, and again
as text within the subsection.
I think my logic is somehow wrong. I have an element subsection which
consists of a heading (ssHdr) and one or more elements TextPara.
I defined ssHdr separetly, as shown above. Maybe the ssHdr should not be
declared within the Subsection? But it seems appropriate to do so. I must be
missing something.
Would appreciate somehone showing me what is wrong here.
jwc
 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
| Current Thread | 
|---|
| 
 | 
| <- Previous | Index | Next -> | 
|---|---|---|
| Re: [xsl] line-breaking and hyphena, Mukul | Thread | FW: [xsl] Double output, Jack Cane | 
| Re: [xsl] line-breaking and hyphena, David Tolpin | Date | FW: [xsl] Double output, Jack Cane | 
| Month |