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

RE: Exclude Doctype for output HTML

Subject: RE: Exclude Doctype for output HTML
From: "Scott Trenda" <Scott.Trenda@xxxxxxxx>
Date: Mon, 5 Nov 2007 13:39:47 -0600
RE:  Exclude Doctype for output HTML
I'm assuming that by "base template", you mean you have a main
stylesheet that does the bulk of your transforms, and that stylesheet
accepts a parameter that specifies which part of the stylesheet you want
to use for your output. And one of those parts produces the option list
you described below.

If that's the case, then the answer is no. Only one output method can be
declared per stylesheet. You'll need to split off the <option> section
into its own stylesheet, and that stylesheet can have <xsl:output
method="html"/> without any doctype declarations. You can use that one
for your AJAX transformation. However, if that <option> section is
needed in the base stylesheet, you could import it via an <xsl:import>;
in that case, the templates defined within the <option> stylesheet will
be available to the base, and the base stylesheet will output with the
correct doctypes as you'd specified; the <xsl:output method="html"/>
from the imported stylesheet will be overwritten by the <xsl:output/> in
the base stylesheet.

Hope that helps!

~ Scott


-----Original Message-----
From: Karl Stubsjoen [mailto:kstubs@xxxxxxxxx]
Sent: Monday, November 05, 2007 1:16 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject:  Exclude Doctype for output HTML

I need to exclude the doctype decleration from the output for HTML.
There is a base template which sets the output type to HTML and
includes a doctype decleration there, but in the child template I need
to override and exclude the doctype output.  Is this possible.

Platform:  .NET 2.0 XSLT 1.0

The problem:  For an Ajax request, I need to return the <option>
elements for my selector element.  IE does not care to well for the
additional doctype decleration in the selector element.  So I'm
getting:
doctype + <options>...</option><option>...</option>

Thanks,

Karl..

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.