[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Outputting closing-slash in XHTML tags

Subject: RE: Outputting closing-slash in XHTML tags
From: "Martinez, Brian" <brian.martinez@xxxxxxxx>
Date: Sun, 30 Mar 2003 14:53:19 -0700
xhtml textarea closing tag
> From: Gan Uesli Starling [mailto:alias@xxxxxxxxxxx]
> Sent: Sunday, March 30, 2003 2:04 PM
> Subject:  Outputting closing-slash in XHTML tags
> 
> I have templates like so...
> 
> <xsl:template match="head">
>    <head>
>      <meta http-equiv="Content-Type" content="text/html; 
> charset=UTF-8"/>
>      <xsl:apply-templates select="title"/>
>      <meta name="author" content="Gan Uesli Starling"/>
> 
>    ...and so on...
> 
> </xsl:template>
> 
> ...but the output looks like so...
> 
> <head>
>    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
>    <xsl:apply-templates select="title">
>    <meta name="author" content="Gan Uesli Starling">
> 
> ...such that the closing slashes are gone. So the XHTML will
> not validate. I am using Xalan for this.
> 
> How may I fix that, please?

The most likely reason (without seeing your stylesheet) is that your
xsl:output element is set to method="html", which will serialize the result
tree as HTML.  Set your output to "xml" and you should get much closer to
your intended output, although you will run into problems with empty element
minimization (i.e., an empty <textarea> tag may be written as <textarea/>,
which plays havoc on most browsers).  Note that XHTML is not a native
processor output in XSLT 1.0, but will be in XSLT 2.0.

cheers,
b.

| brian martinez                              brian.martinez@xxxxxxxx |
| lead gui programmer                                    303.708.7248 |
| trip network, inc.                                 fax 303.790.9350 |
| 6436 s. racine cir.                             englewood, co 80111 |
| http://www.cheaptickets.com/                   http://www.trip.com/ |

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.