|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Outputting closing-slash in XHTML tags
> 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








