[xsl] Content in html tags

Subject: [xsl] Content in html tags
From: Aaron Johnson <Aaron2.Johnson@xxxxxxxxx>
Date: Tue, 05 Jul 2005 14:57:10 +0100
Hello...

I have been given an xsl problem and don't have a clue where to
start!....this is what I was sent, any help would be appreciated!

Here is an xslt...It's supposed to allow me
to wrap the content in html tags when required. Clearly it's malformed
xml, so how can I achieve it without repeating the "Testing!" section?


<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" exclude-result-prefixes="soap atg"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:atg="http://atg.uwe.ac.uk/soap/";
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
    <xsl:output indent="yes" method="html" omit-xml-declaration="yes"/>
    
    <xsl:param name="stylusStudio">false</xsl:param>

    <xsl:template match="/">
    <xsl:if test="$stylusStudio='true'">
        <html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
            <head>
                <title>UWE Reenrolment</title>
                <link rel="stylesheet" type="text/css"
href="http://my.uwe.ac.uk/uPortal/media/org/jasig/portal/layout/AL_TabColumn
/integratedModes/myuwe/skin/myuwe.css"/>
            </head>
            <body>
    </xsl:if>

    Testing!

  <xsl:if test="$stylusStudio='true'">
            </body>
        </html>
    </xsl:if>
    </xsl:template>
</xsl:stylesheet>

..................................................................

Aaron Johnson
GUI / XSLT development
Academic Technologies Group [ATG]
University of the West of England
0117 3281051 [ext: 81051]
atg.uwe.ac.uk/aaron

SECURITY POLICY:

Please note that ATG will only accept
e-mail attachments in the following
formats: 

.asp,.bin,.doc,.gif,.html,.jpg,.mdb,.png,
.psd,.shtml,.sdf,.sit,.xls,.xml,.xsd,.xsl,.zip,

..................................................................

This communication is intended solely
for the use of the individual(s) to whom
it is addressed. Any opinions presented
are those of the author and do not
necessarily represent the University of
the West of England, Bristol.
..................................................................



This email has been independently scanned for viruses and any virus software has been removed using McAfee anti-virus software

Current Thread