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

Re: XSL to XSL?

Subject: Re: XSL to XSL?
From: "Steve Muench" <smuench@xxxxxxxxxxxxx>
Date: Wed, 5 Apr 2000 13:11:15 -0700
xsl to xsl
Yes.

You can take advantage of the built-in XSLT 1.0
feature called <xsl:namespace-alias> to do the 
following:

<x:stylesheet xmlns:x="http://www.w3.org/1999/XSL/Transform"
              xmlns:xsl="anything" version="1.0">
<x:output method="xml" indent="yes"/>
<x:namespace-alias stylesheet-prefix="xsl" result-prefix="x"/>
<x:template match="/">
  <xsl:stylesheet version="1.0">
    <xsl:template match="/">
      <xsl:value-of select="foo"/>
    </xsl:template>
   </xsl:stylesheet>
</x:template>
</x:stylesheet>

This outputs the valid XSLT stylesheet:

<?xml version = '1.0' encoding = 'UTF-8'?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
   <xsl:template match="/">
      <xsl:value-of select="foo"/>
   </xsl:template>
</xsl:stylesheet>

I tried this with the Oracle XSLT Processor release 2.0.2.7,
but any XSLT-REC-compliant processor should behave
similarly. I just also tried Saxon 5.2, XT which work as well.

______________________________________________________________
Steve Muench, Lead XML Evangelist & Consulting Product Manager
Business Components for Java Dev't Team, Oracle Corporation

----- Original Message ----- 
From: "Michael J. Hudson" <mhudson@xxxxxxxxxxxxxxxxxxxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxx>
Sent: Wednesday, April 05, 2000 12:28 PM
Subject: XSL to XSL?


| 
| Here's what I'm currently doing.  My task is to come up with a 
| general way to transform any one XML file into another XML file
| with different DTDs.  Now, what I'm doing is creating a tool that
| creates a mapping file that maps elements from one XML file to
| another.  This is all fine and dandy.  But now, I need to write
| an XSLT file that translates that XML mapping file into another
| XSLT script.  That final XSLT script being the script that people
| would use to translate their XML files from one to another.
| 
| The problem I'm having is getting an XSL script to output XSL
| elements.  That is, I want the output to be another XSL file. 
| The way I'm currently solving this, is using another namespace
| other than xsl.... say temp.  So, that 'xsl:for-each' becomes
| 'temp:for-each'.  And then I have a method that reads in the
| output file and does a find-replace changing temp back to xsl.
| Now, not being an expert in XSLT... I'm wondering if I'm 
| bending over backwards to do this.  Is there way in XSLT to
| have XSLT element outputs that don't affect the original
| XSLT file??
| 
| Thanks!
| 
| -------------------------------------
| Michael J. Hudson
| Software/Framework Engineer
| mhudson@xxxxxxxxxxxxxxxxx
| 
| cell-phone: 703.932.6412
| voice-mail: 703.827.0638 ext. 4786
| fax: 703.734.0987
| 
| Blueprint Technologies
| "The E-Solution Architect" 
| http://www.blueprinttech.com
| 
| 
|  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
| 


 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.