<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Northern Binary &#187; XSLT</title>
	<atom:link href="http://blog.northernbinary.org/category/xslt/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.northernbinary.org</link>
	<description></description>
	<lastBuildDate>Thu, 11 Mar 2010 10:16:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>CoreTween v1.0.0 beta 2 available</title>
		<link>http://blog.northernbinary.org/coretween/coretween-v100-beta-2-available/</link>
		<comments>http://blog.northernbinary.org/coretween/coretween-v100-beta-2-available/#comments</comments>
		<pubDate>Mon, 17 Dec 2007 08:02:36 +0000</pubDate>
		<dc:creator>Luke</dc:creator>
				<category><![CDATA[CoreTween]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[XSLT]]></category>

		<guid isPermaLink="false">http://blog.opject.org/?p=19</guid>
		<description><![CDATA[
For the past week I&#8217;ve been working hard on the CoreTween website and the CoreTween library. Small changes where made to the CoreTween library and a new reference section has been added to the website.


One of the problems I was facing with the CoreTween reference documentation was the fact that CoreTween supports four different languages. [...]]]></description>
			<content:encoded><![CDATA[<p>
For the past week I&#8217;ve been working hard on the CoreTween <a href="http://www.coretween.org" onclick="javascript:pageTracker._trackPageview ('/outbound/www.coretween.org');">website</a> and the CoreTween library. Small changes where made to the CoreTween library and a new reference section has been added to the website.
</p>
<p>
One of the problems I was facing with the CoreTween reference documentation was the fact that CoreTween supports four different languages. Because 90% of the documentation is the same for all four languages I need some sort of scheme that wouldn&#8217;t involve duplicating any data. My first choice was of course to store the reference documentation in a good &#8216;ol database. But to do that effectively I also needed some sort of CMS through which I easily could fill this database. No of the shelf solution fitted this so I reverted to another solution.
</p>
<p>
For a long time I&#8217;ve been wanting to do more (and learn more about) XSLT. This fascinating XML technology has been on my mind a lot lately and so I decided that this would be a good time to start using it. The reference documentation for CoreTween is therefore stored in a simple plain XML document which is easy to edit with a normal text editor. The XML Stylesheet then converts this XML document to the appropriate HTML document containing the correct implementation language (ActionScript 1, 2, 3 or haXe). Within the XML document there are tags that look like this:
</p>
<pre>
&lt;if&gt;
   &lt;as3&gt;
      void
   &lt;/as3&gt;
   &lt;otherwise&gt;
      Void
   &lt;/otherwise&gt;
&lt;/if&gt;
</pre>
<p>
This way its easy to specify only the differences between the supported programming languages and keep all the other stuff the same. The XML Stylesheet takes care of filtering the &lt;if&gt; tags to the correct value. These vales are passed from the URL to the PHP script that executes the XSLT processor. Try a sample of the <a href="http://coretween.opject.org/reference/api.php?api=TweenManager&#038;language=as3" onclick="javascript:pageTracker._trackPageview ('/outbound/coretween.opject.org');">TweenManager</a> class for a demonstration. To change to implementation language, simply change the &#8216;language&#8217; parameter on the URL to <i>as1</i>, <i>as2</i>, <i>as3</i> or <i>haxe</i>. Follow <a href="http://coretween.opject.org/reference/api/TweenManager.xml" onclick="javascript:pageTracker._trackPageview ('/outbound/coretween.opject.org');">this</a> link to have a look inside the TweenManager XML document that defines the reference documentation.</p>
<p>Of course, on the final website you can easily change between implementation languages. But that&#8217;s still in the works.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.northernbinary.org/coretween/coretween-v100-beta-2-available/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
