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

overriding <xsl:output> attributes

Subject: overriding <xsl:output> attributes
From: "Lynn Murdock" <lmurdock@xxxxxxxx>
Date: Thu, 8 Jul 2010 16:34:02 -0700
 overriding <xsl:output> attributes
hi-

i have a document A that imports document B.

in the <xsl:output> instruction, document B specifies doctype-public and
doctype-system attributes.  in document A, i want to disable output of
doctypes, as we add the doctype declaration at another point in our production
pipeline (ie, not in the xsl).

here's the relevant code for document A (importing):

<xsl:output
        method="html"
        indent="no"
        encoding="UTF-8"
        omit-xml-declaration="yes"/>

and here's the relevant code for document B (imported):

<xsl:output
        method="html"
        indent="yes"
        encoding="UTF-8"
        doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
        doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.d
td"/>

simply omitting the doctype statements in the importing document does not
disable the output of doctype statements.  according to michael kay's book, a
specified attribute within <xsl:output> takes precedence over an omitted
attribute, regardless of which document it's in (importing or imported).

i have tried adding a name attribute to the importing statement, to try to
create a new output definition, with no success.  i have also tried using
doctype-public="" and doctype-system="" in the importing document, but these
simply output a doctype statement with a "" value.

is there a way to completely disable the output of these statements in the
resulting html, given that i can't modify the imported document?

i'm using saxon 8.7, and xsl 2.0.

any insight into this issue would be much appreciated.


thanks-

lynn

-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
----------------------------------------------------------------
This email is confidential to the intended recipient. If you have received it
in error, please notify the sender and delete it from your
system. Any unauthorized use, disclosure or copying is not permitted. The
views or opinions presented are solely those of the sender and do
not necessarily represent those of Public Library of Science unless otherwise
specifically stated. Please note that neither Public Library
of Science nor any of its agents accept any responsibility for any viruses
that may be contained in this e-mail or its attachments and it
is your responsibility to scan the e-mail and attachments (if any).

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.