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

Re: XSLT compiler and syntax extensions

Subject: Re: XSLT compiler and syntax extensions
From: Andriy Gerasika <andriy.gerasika@xxxxxxxxx>
Date: Thu, 18 Nov 2010 06:30:11 +0200
Re:  XSLT compiler and syntax extensions
I've implemented a variety of other extensions, with plans for more,
and have ideas for a variety of directions this tool could take.


Speaking of this "xsl:if+xsl:attribute" extension, I do not think it is very practical.


About XSLT 2.0 to XSLT 1.0 compiler:

a) It will not support all XSLT 2.0 functionality, because of obvious limitations in XSLT 1.0
b) Using it will make XSLT code difficult to debug. If you'll make an error, it will report line location distorted for all code that follows
<xsl:variable
name="name"
select="select"
as="type" />


Generally, the best possible way to experiment w/ XSLT syntax sugar is to use URIResolver coupled w/ SAX ContentHandler.

For example, I am actively using my own syntax sugar extension that enables sort of modules via modes:
http://www.gerixsoft.com/blog/xslt/xsl-include-mode-new


Plus couple of experimental extensions:
1) Embedding XQuery directly into XSLT code:
	<xsl:template match="a">
		<aa>
			<saxon:query>
				<from-xquery>
				{
					$current
				}
				</from-xquery>
			</saxon:query>
		</aa>
	</xsl:template>

2) XSLT w/ XQuery like syntax:
<?xml version="1.0" encoding="utf-8"?>

<xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" xmlns:gml-prefix="xsl">

output method="xml" omit-xml-declaration="no" indent="no" encoding="UTF-8";

include href="link1.xsl";
include href="link2.xsl";
include href="link3.xsl";

template match="/" {
variable name="link1" {
<aa>
apply-templates mode="link1" select="node()";
</aa>
}
variable name="link2" {
<bb>
apply-templates mode="link2" select="exsl:node-set($link1)/node()";
</bb>
}
variable name="link3" {
<cc>
apply-templates mode="link3" select="exsl:node-set($link2)/node()";
</cc>
}

copy-of select="exsl:node-set($link3)/node()";
}


</xsl:transform>

This one looks pretty promising, but I am not currently using it because of lack of syntax highlighting.

So, the question is, would anyone here be interested in a tool like
this?  What types of features would you like to see it include?  If
this were to be turned into an open project, would anyone be
interested in collaborating on its further development?  I'm
interested in any type of feedback, positive, negative or otherwise.

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.