Subject: [xsl] XSL 2.0 xsl:result-document and xsl:output From: Jarkko Moilanen <Jarkko.Moilanen@xxxxxx> Date: Thu, 27 Feb 2003 09:16:29 +0200 (EET) |
Hi! In the following draft version of XSL 2.0 http://www.w3.org/TR/xslt20/#element-output there is this instruction: <!-- Category: instruction --> <xsl:result-document format = qname href = { uri-reference } type-information = "strict" | "lax" | "preserve" | "none"> <!-- Content: content-constructor --> </xsl:result-document> and <!-- Category: declaration --> <xsl:output name = qname method = "xml" | "html" | "xhtml" | "text" | qname-but-not-ncname version = nmtoken encoding = string omit-xml-declaration = "yes" | "no" standalone = "yes" | "no" doctype-public = string doctype-system = string cdata-section-elements = qnames escape-uri-attributes = "yes" | "no" include-content-type = "yes" | "no" indent = "yes" | "no" media-type = string normalize-unicode = "yes" | "no" /> In my opinion there should be something that instructs the processor to overwrite or concatenate the result to external file. (Sorry about my Mika Häkkinen english). The example usage of this instruction: <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xhtml="http://www.w3.org/1999/xhtml"> <xsl:output name="log" version="2.0" method="xml" indent="yes" doctype-system="example" doctype-public="example"/> <xsl:output name="content" method="html" indent="no" doctype-system="example" doctype-public="example"/>/> <xsl:template match="/"> <!-- write this to the content --> <xsl:result-document href="content.html" format="content" type-information="none"> <xsl:value-of select = "translate('jarkko','j','J')" /> </xsl:result-document> <!-- write this to the log --> <xsl:result-document href="log.xml" format="log" type-information="none"> <logElement>Initiated translate function</logElement> // but there is noway to say that the element should overwrite the // existing content in the log.xml or neither is there option to say that // the element should be written after existing content in log.xml </xsl:result-document> <!-- write this to the content --> <xsl:result-document href="content.html" format="content" type-information="none"> ....do other stuff..... <xsl:value-of select = "$foo" /> </xsl:result-document> <xsl:result-document format="xml" href="log.xml"> <logElement>Called variable foo</logElement> </xsl:result-document> // so this <logelement> should also be written to the log.xml file // after the previous one. </xsl:template> </xsl:stylesheet> Opinions? Cheers, Jarkko **************************************************************** Jarkko Moilanen "Erehtyminen on inhimillista, Researcher mutta todella suuret mokat jm60697@xxxxxx vaativat tietokoneen käyttöä." www.uta.fi/~jm60697 GSM: +358 50 3766 927 **************************************************************** * ITCM | Information Technology and Crisis Management * http://www.itcm.org **************************************************************** XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[no subject], mirza alim | Thread | [xsl] [News] Antenna House XSL Form, Keiko Hiraide |
Re: [xsl] Fw: Select entire XML doc, Karl Stubsjoen | Date | Re: [xsl] Re: The Perils of Sudden , Kurt Cagle |
Month |