| Subject: RE: How to parse an element with content and child-elements From: sara.mitchell@xxxxxxxxx Date: Mon, 6 Mar 2000 14:40:06 -0500 | 
| This is very simple 
-- you use two templates. For example:  <xsl:template 
match="content">  <p>   
<xsl:apply-templates/> </p> </xsl:template> This one put in the 
P tags around the content and processes any children (both text AND 
other elements). Text 
simply comes out as text (there's a default template for text). Any other 
child element comes out 
matching a template for that child if you provide it. So you're other 
template would be this: 
 <xsl:template 
match="other-content">  <br/>   <font 
color="red">    
 <xsl:apply-templates/>   
</font>  <br/> </xsl:template> When the XSL 
processor finds the Other-content tag, it looks for the second template 
 and inserts the BR 
and Font tags. The <xsl:apply-templates> tag inside of the 
template for Other-content 
simply makes sure that the text children or any other element 
children are also formatted 
and output.  Sara 
 | 
| Current Thread | 
|---|
| 
 | 
| <- Previous | Index | Next -> | 
|---|---|---|
| How to parse an element with conten, Kai Ritterbusch | Thread | XSLT: Does an element know about it, Wolfgang May | 
| XSLT vs OmniMark, Steven Mielnicki | Date | Travesing back up 'tree', Collin, Jeffrey | 
| Month |