xsl-list
[Top] [All Lists]

[xsl] overriding <xsl:output> attributes

2010-07-09 01:40:47
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.dtd"/>

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).

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>