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

XSL 2.0 xsl:result-document and xsl:output

Subject: 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)
xsl result document
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

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.