<?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>Inasmuch as...</title>
	<atom:link href="http://inasmuch.as/feed/" rel="self" type="application/rss+xml" />
	<link>http://inasmuch.as</link>
	<description>...Life&#039;s but a walking shadow</description>
	<lastBuildDate>Fri, 14 Jun 2013 11:16:00 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Whither Mentea?</title>
		<link>http://inasmuch.as/2013/06/14/whither-mentea/</link>
		<comments>http://inasmuch.as/2013/06/14/whither-mentea/#comments</comments>
		<pubDate>Fri, 14 Jun 2013 11:16:00 +0000</pubDate>
		<dc:creator>tkg</dc:creator>
				<category><![CDATA[Company]]></category>

		<guid isPermaLink="false">http://inasmuch.as/?p=1551</guid>
		<description><![CDATA[Inasmuch as the last twelve months of on-site contracting has been more remunerative than any twelve month period of my usual mix of mostly-off-site consulting and on-site training, it&#8217;s time to consider what&#8217;s next for Mentea and what I&#8217;ll be &#8230; <a href="http://inasmuch.as/2013/06/14/whither-mentea/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><span style="font-variant: small-caps;">Inasmuch as</span> the last twelve months of on-site contracting has been more remunerative than any twelve month period of my usual mix of mostly-off-site consulting and on-site training, it&#8217;s time to consider what&#8217;s next for Mentea and what I&#8217;ll be doing come September: will I be a consultant, a contractor, or (gasp) even an employee?</p>
<p>I have enjoyed the work and the company of my co-workers, but there&#8217;s a few points to note:</p>
<ul>
<li>Going &#8220;across the water&#8221; to England to work may be almost an Irish tradition, yet it has shown the undesirability of living away from home for extended periods</li>
<li>Since I&#8217;ve not known what I&#8217;ll be doing after the contract ends, I&#8217;ve kept doing work for some of my consulting clients at nights and weekends, but that hasn&#8217;t always got them results as quickly as they would like and, frankly, it made a very poor lifestyle choice</li>
<li>There&#8217;s been little time left for side projects (or, you may have noticed, for blog posts), yet I have many side projects related to XML, XSLT, and XSL-FO and would have more if I had the time – I don&#8217;t aspire to it, but I was interested to see that the <a title=".net awards 2013" href="http://www.thenetawards.com/">.net awards</a> has elevated side projects to being an award category of their own</li>
<li>As a contractor rather than an employee, I don&#8217;t get sick leave or holiday pay, so catching a cold can (and did) cost me money, but I&#8217;m able once the contract ends to have a long break visiting family on the other side of the world and then going to <a title="Balisage: The Markup Conference" href="http://www.balisage.net/">Balisage</a></li>
<li>As a contractor, I&#8217;ve also had the freedom to go to <a title="XML Prague" href="http://www.xmlprague.cz/">XML Prague</a> and to the <a title="Making the Multilingual Web Work" href="http://www.multilingualweb.eu/documents/rome-workshop/rome-program">MultilingualWeb workshop in Rome</a> without having to fret about departmental training budgets, how the events align with corporate goals, or using precious holiday days and my own money (though in a sense it was) if I did out of my own pocket, though I did miss the W3C <a title="eBooks &amp; i18n: Richer Internationalization for eBooks" href="https://www.w3.org/2013/06/ebooks/Overview.php">&#8220;eBooks and I18n&#8221; workshop</a> last week in Tokyo because of pressures of work, so to be a contractor isn&#8217;t to be a completely free agent, and if I was still or again a member of an active W3C WG, then multiple face-to-face meetings a year would strain my finances more than they would a large corporation&#8217;s</li>
</ul>
<p>So what am I looking for?  Firstly, a good, long break before I address the question for real after Balisage in August. Secondly, to be based back in Ireland, at least most of the time. Beyond that, it&#8217;s undecided.  I&#8217;m not running away from consulting nor running towards either employment or more contracting. Consulting has been good to me, and been good for me since I can use a wide range of skills with different clients, but the difficulty has always been getting the right amount of work to arrive at just the right intervals so that I&#8217;m neither swamped nor starved for work.</p>
]]></content:encoded>
			<wfw:commentRss>http://inasmuch.as/2013/06/14/whither-mentea/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adapt Saxon-CE event model to XSL-FO?</title>
		<link>http://inasmuch.as/2013/04/17/saxon-ce-events-xsl-fo/</link>
		<comments>http://inasmuch.as/2013/04/17/saxon-ce-events-xsl-fo/#comments</comments>
		<pubDate>Wed, 17 Apr 2013 12:33:59 +0000</pubDate>
		<dc:creator>tkg</dc:creator>
				<category><![CDATA[XSL-FO]]></category>

		<guid isPermaLink="false">http://inasmuch.as/?p=1511</guid>
		<description><![CDATA[Inasmuch as the Print and Page Layout Community Group at the W3C is looking at how to get feedback from the XSL formatter and I&#8217;ve also been reading about how Saxon-CE handles user input, I&#8217;m now wondering whether the same &#8230; <a href="http://inasmuch.as/2013/04/17/saxon-ce-events-xsl-fo/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><span style="font-variant: small-caps;">Inasmuch as</span> the <a title="Print and Page Layout Community Group homepage @ W3C" href="http://www.w3.org/community/ppl/">Print and Page Layout Community Group</a> at the W3C is looking at how to get feedback from the XSL formatter and I&#8217;ve also been reading about how <a title="Saxon-CE documentaiton at saxonica.com" href="http://www.saxonica.com/ce/user-doc/1.1/index.html">Saxon-CE</a> handles user input, I&#8217;m now wondering whether the same sort of pattern could be adapted to handling feedback from the XSL formatter.  Saxon-CE <a title="&quot;Design Approach&quot; in Saxon-CE documentation" href="http://www.saxonica.com/ce/user-doc/1.1/index.html#!about/design">does it </a>through template rules that match the element that receives the event and are in a mode that reflects the type of event, and similarly an XSL formatter could trigger on exceptional events such as overflow occurring or even on mundane events such as completion of a page sequence, and the templates in the corresponding modes could match on either FOs in the FO tree or areas in the area tree.<span id="more-1511"></span></p>
<p>The <a title="Extensible Stylesheet Language (XSL) Requirements Version 2.0" href="http://www.w3.org/TR/xslfo20-req/">XSL-FO 2.0 Requirements</a> document includes, among others, requirements for: <a title="Section 2.3, Feedback from pagination stage" href="http://www.w3.org/TR/xslfo20-req/#N66678">feedback from the pagination stage</a>; <a title="Section 3.1, Including information from formatting time" href="http://www.w3.org/TR/xslfo20-req/#N66711">including information from formatting time</a>; and <a title="Section 3.3, Output result of expression" href="http://www.w3.org/TR/xslfo20-req/#output-result-of-expression">outputting the result of an expression</a> back into the area tree.  However, the XML Print and Page Layout Working Group (as the XSL-FO subgroup became) never got to the point of working out how any of those would be expressed.</p>
<p>More recently, the Print and Page Layout Community Group has been collecting <a title="&quot;Frequently and less frequently stated requirements by print customers&quot; page on ppl wiki" href="http://www.w3.org/community/ppl/wiki/CustomerRequirements">examples where feedback from the formatter is useful</a> – or essential – for a satisfactory result.  Thanks to Arved Sandtrom we also have <a title="Announcement of initial source code availability." href="http://lists.w3.org/Archives/Public/public-ppl/2013Mar/0036.html">proof-of-concept</a> for running a XSL formatter from a XSLT extension function to get an area tree, so an XSLT stylesheet can now make decisions about what to put in the result based on the trial formatted size of areas, but as it&#8217;s only a proof-of-concept, it doesn&#8217;t aim as high as getting feedback from or modifying in-situ the area tree for the final, formatted document.</p>
<p>Once people have tried a few things with getting feedback from the XSL formatter and start asking their vendors for the same or better, they&#8217;ll also be wanting an interoperable way to express what to do with that feedback.  For simple feedback of static area trees, which is all that is possible with the current proof-of-concept, the most interoperability that you could manage would be a common representation of area trees (with flexibility for vendor extensions) and, possibly, a library of XSLT functions to make it easier to navigate the area trees, but for &#8220;live&#8221; feedback, something more would be required.</p>
<p>The following template from the &#8220;<a title="&quot;Knight's Tour&quot; sample Saxon-CE application" href="http://www.saxonica.com/ce/user-doc/1.1/index.html#!samples/tour">Knight&#8217;s Tour</a>&#8221; sample Saxon-CE application is the event handler for when the user clicks the &#8216;Reset&#8217; button.  It simply writes a <span style="font-variant: small-caps;">no-break space</span> to each square on the Knight&#8217;s chess board</p>
<pre>&lt;xsl:template match="button[@id='reset']" mode="ixsl:onclick"&gt;
  &lt;xsl:for-each select="//div[starts-with(@id, 'square')]"&gt;
     &lt;xsl:result-document href="#{@id}" method="replace-content"&gt;
       &lt;xsl:text&gt;&amp;#xa0;&lt;/xsl:text&gt;
     &lt;/xsl:result-document&gt;
  &lt;/xsl:for-each&gt;
&lt;/xsl:template&gt;</pre>
<p>The key feature of the event handler for the purposes of this discussion is that it&#8217;s written in plain old XSLT.  The advantage of the XSLT event handler for Saxon-CE users is interactivity &#8220;without dropping down into JavaScript&#8221; (as the <a title="&quot;Handling user input events&quot; in Saxon-CE documentation" href="http://www.saxonica.com/ce/user-doc/1.1/index.html#!coding/events">Saxon-CE documentation</a> so delicately puts it), but the advantage for XSL-FO users would simply be that they don&#8217;t need to learn a new language (declarative, functional, or otherwise) to handle feedback.  (And the advantage for those of us trying to define or implement feedback is that we don&#8217;t need to invent a whole new language to handle it.)</p>
<p>Applying the Saxon-CE approach to XSL-FO, the following illustrative FO event handler would handle a figure overflowing its available space by reducing its size to 80% of the current.</p>
<pre>&lt;xsl:template match="BlockArea[key('fig', @id, $src-doc)]"
              mode="ppl:overflow"&gt;
  &lt;xsl:result-document href="#{@id}/area:external-graphic"
                       method="replace-content"&gt;
    &lt;xsl:copy&gt;
      &lt;xsl:apply-templates select="@*"/&gt;
      &lt;xsl:attribute name="width"
                     select="ppl:scale(area:external-graphic/@width,
                                       0.8)"/&gt;
      &lt;xsl:apply-templates/&gt;
    &lt;/xsl:copy&gt;
  &lt;/xsl:result-document&gt;
&lt;/xsl:template&gt;</pre>
<p>(I invented a <code>ppl:scale()</code> XSLT extension function here so the new length is written back to the area tree rather than requiring that XSL formatters support an expression language in area tree trait values.)</p>
<p>An extra wrinkle for XSL-FO is the question of whether event handlers should be specified to (a) match on, and (b) modify the FO tree or the area tree or both.  There are some existing requirements that can only be satisfied by modifying the area tree, e.g., <a title="Section 3.3, Output result of expression" href="http://www.w3.org/TR/xslfo20-req/#output-result-of-expression">Section 3.3, Output result of expression</a>:</p>
<blockquote><p>Allow users to output the result of expressions on area tree, traits, markers or text content. For example to calculate the subtotal of a certain page (as opposed to a running total that is already supported in XSL 1.1 with table markers)</p></blockquote>
<p>On the other hand, it will often be simpler (from the user&#8217;s perspective) to modify an FO rather than all the areas that it generates, since a single FO may generate multiple areas across several columns or pages (and footnote areas), and its content may be reused in markers on multiple pages.  If, for example, the response to a page sequence taking too many pages is to reduce the font size in one of the multiple flows appearing on the page, it would be at once simple to adjust the <code>font-size</code> property on the appropriate FOs in the FO tree and inaccurate to directly modify font sizes in the line areas in the area tree.  If the XSL formatter did the work based on modified FOs, it would reflow the line areas based on their reduced font size and make the pages again and the resulting modified block areas would break across pages in different places because of the smaller font size.  If the XSLT stylesheet did the work by modifying the area tree, it would have to do the same recalculating of text sizes and the same merging or splitting of line areas and of block areas, and all (probably) without the benefit of font metrics.  It might work, just, in a simple case with only monospace fonts, but would still be a lot of work to do in XSLT.</p>
<p>Adapting the Saxon-CE event model to XSL-FO is, therefore, an interesting possible solution to handling feedback from the XSL formatter, but there are still many FO-specific details that would have to be worked out.</p>
]]></content:encoded>
			<wfw:commentRss>http://inasmuch.as/2013/04/17/saxon-ce-events-xsl-fo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>generate-id() in xsl:attribute-set</title>
		<link>http://inasmuch.as/2012/12/10/generate-id-in-xsl-attribute-set/</link>
		<comments>http://inasmuch.as/2012/12/10/generate-id-in-xsl-attribute-set/#comments</comments>
		<pubDate>Mon, 10 Dec 2012 22:48:41 +0000</pubDate>
		<dc:creator>tkg</dc:creator>
				<category><![CDATA[XSL]]></category>
		<category><![CDATA[XSL-FO]]></category>

		<guid isPermaLink="false">http://inasmuch.as/?p=1494</guid>
		<description><![CDATA[Inasmuch as xsl:attribute-set is most often thought of for adding constant sets of XSL-FO properties, it&#8217;s easy to forget that, as it says in the XSLT 2.0 spec: Evaluating the same attribute set more than once can produce different results, &#8230; <a href="http://inasmuch.as/2012/12/10/generate-id-in-xsl-attribute-set/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><span style="font-variant: small-caps;">Inasmuch as</span> <code>xsl:attribute-set</code> is most often thought of for adding constant sets of XSL-FO properties, it&#8217;s easy to forget that, as it says in the <a title="&quot;Named Attribute Sets&quot; in XSLT 2.0" href="http://www.w3.org/TR/xslt20/#attribute-sets">XSLT 2.0 spec</a>:</p>
<blockquote><p>Evaluating the same attribute set more than once can produce different results, because although an attribute set does not have parameters, it may contain expressions or instructions whose value depends on the evaluation context.<span id="more-1494"></span></p></blockquote>
<p>This changing context was useful recently when customising an existing XSL-FO stylesheet included adding <code>id</code> properties for use as the targets of <code>fo:basic-link</code> cross-references.  Since I couldn&#8217;t  modify the base stylesheet, I was looking at having to replicate multiple templates just to add the <code>id</code> properties where needed. However, to make it easy to customise the base stylesheet, its templates for the elements of interest each referred to named attribute sets and, more often than not, I was already adding to the same attribute sets in my stylesheet that imported the base stylesheet. It was simple, therefore, to add the <code>xsl:attribute</code> for the <code>id</code> property to the customisations of the attribute sets and be able to leave the base stylesheet&#8217;s templates unaltered.</p>
<p>The short form of what I was doing may be seen as:</p>
<pre>&lt;xsl:attribute-set name="fig"&gt;
  &lt;xsl:attribute name="id" select="generate-id()" /&gt;
&lt;/xsl:attribute-set&gt;</pre>
<p>where the changing context for each time the attribute set is used produces a different <code>id</code> attribute each time, each containing the unique ID for the then-current context node.</p>
<p>However, the source XML had <code>id</code> attributes on some elements already, and I wanted to hook into using the existing machinery in the base stylesheet for getting either the assigned ID or a generated ID, so the code in the customising stylesheet was more like:</p>
<pre>&lt;xsl:attribute-set name="fig"&gt;
  &lt;xsl:attribute name="id"&gt;
    &lt;xsl:call-template name="get-id" /&gt;
  &lt;/xsl:attribute&gt;
&lt;/xsl:attribute-set&gt;

&lt;xsl:template name="assign-id"&gt;
  &lt;xsl:param name="node" select="."/&gt;
  &lt;xsl:attribute name="id"&gt;
    &lt;xsl:call-template name="get-id"&gt;
      &lt;xsl:with-param name="node" select="$node"/&gt;
    &lt;/xsl:call-template&gt;
  &lt;/xsl:attribute&gt;
&lt;/xsl:template&gt;
  
&lt;xsl:template name="get-id"&gt;
  &lt;xsl:param name="node" select="."/&gt;
  &lt;xsl:apply-templates select="$node" mode="id"/&gt;
&lt;/xsl:template&gt;</pre>
<p>where the <code>assign-id</code> template overrides the corresponding template in the base stylesheet and part of the function of the original <code>assign-id</code> is broken out into <code>get-id</code> for use in the attribute sets.  And did I mention that the base stylesheet, and therefore also its customisation, was written in XSLT 1.0 for maximum portability?</p>
]]></content:encoded>
			<wfw:commentRss>http://inasmuch.as/2012/12/10/generate-id-in-xsl-attribute-set/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>\Boot\BCD is missing required information</title>
		<link>http://inasmuch.as/2012/10/14/bootbcd-is-missing-required-information/</link>
		<comments>http://inasmuch.as/2012/10/14/bootbcd-is-missing-required-information/#comments</comments>
		<pubDate>Sun, 14 Oct 2012 11:06:50 +0000</pubDate>
		<dc:creator>tkg</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://inasmuch.as/?p=1486</guid>
		<description><![CDATA[Inasmuch as a Windows partition that wouldn&#8217;t boot frustrated and inconvenienced me for nearly a week, and the solution, when I found it, took only a couple of minutes, I&#8217;m writing it up here. The symptom when trying to boot &#8230; <a href="http://inasmuch.as/2012/10/14/bootbcd-is-missing-required-information/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><span style="font-variant: small-caps;">Inasmuch as</span> a Windows partition that wouldn&#8217;t boot frustrated and inconvenienced me for nearly a week, and the solution, when I found it, took only a couple of minutes, I&#8217;m writing it up here.</p>
<p>The symptom when trying to boot into Windows was a black-and-white screen of death containing:</p>
<pre>File: \Boot\BCD
Status: 0xc0000034
Info: The Windows Boot Configuration Data file is missing
  required information</pre>
<p>The official Microsoft advice at <a title="Error message when you start Windows Vista: &quot;The Windows Boot Configuration Data file is missing required information&quot;" href="http://support.microsoft.com/kb/927391/en-us">http://support.microsoft.com/kb/927391/en-us</a> didn&#8217;t help.  What did work was the second option, &#8220;Manually Repairing the Windows Bootloader&#8221;, from <a title="Recovering the Vista or Windows 7 Bootloader from the DVD" href="http://neosmart.net/wiki/display/EBCD/Recovering+the+Windows+Bootloader+from+the+DVD">http://neosmart.net/wiki/display/EBCD/Recovering+the+Windows+Bootloader+from+the+DVD</a>:</p>
<pre>attrib -h -s C:\boot\BCD

del C:\boot\BCD
bootrec.exe /rebuildbcd</pre>
<p>Happily, I didn&#8217;t need to do the third, &#8220;Nuclear Holocaust&#8221; option from that page.</p>
]]></content:encoded>
			<wfw:commentRss>http://inasmuch.as/2012/10/14/bootbcd-is-missing-required-information/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XML Summer School 2012</title>
		<link>http://inasmuch.as/2012/09/02/xml-summer-school-2012/</link>
		<comments>http://inasmuch.as/2012/09/02/xml-summer-school-2012/#comments</comments>
		<pubDate>Sun, 02 Sep 2012 11:09:57 +0000</pubDate>
		<dc:creator>tkg</dc:creator>
				<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://inasmuch.as/?p=1471</guid>
		<description><![CDATA[Inasmuch as last year&#8217;s sessions were both enjoyable and well received, I&#8217;m teaching two sessions at XML Summer School again in September this year. One, in the XSLT and XQuery track, is an update of the Developing and Testing in &#8230; <a href="http://inasmuch.as/2012/09/02/xml-summer-school-2012/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><span style="font-variant: small-caps;">Inasmuch as</span> <a title="XML Summer School 2011" href="/2011/06/27/xml-summer-school-2011/">last year&#8217;s sessions</a> were both enjoyable and well received, I&#8217;m teaching two sessions at <a title="XML Summer School website" href="http://www.xmlsummerschool.rom">XML Summer School</a> again in September this year.</p>
<p>One, in the <em>XSLT and XQuery</em> track, is an update of the <em>Developing and Testing in XSLT</em> talk, again alongside Jeni Tennison, that got us such a good review last year:</p>
<blockquote><p>Unit tests, pro­fil­ing, debug­ging and, increas­ingly, test-driven devel­op­ment are part of the bread and but­ter of work­ing with other pro­gram­ming lan­guages but are not always so with XSLT or XQuery. In test-driven devel­op­ment, which is a fun­da­mental part of agile approaches to soft­ware devel­op­ment, the developers write tests that describe the desired beha­viour of their applic­a­tion, then write code that meets the tests. This style of devel­op­ment keeps code focused, avoids break­ing exist­ing code and facil­it­ates refactoring.</p>
<p>In this ses­sion, Jeni Ten­nison and Tony Gra­ham will describe both the state of the art in test­ing and debug­ging XSLT and XQuery and how test-driven devel­op­ment applies to XSLT and XQuery devel­op­ment. In par­tic­u­lar, they will focus on the use of the XSpec test­ing framework.</p></blockquote>
<p>The other, in the <em>Publishing</em> track, is <em>XML and Publishing Workflows</em>:</p>
<blockquote><p>Some formats are bet­ter or worse than oth­ers for cap­tur­ing and/or rep­res­ent­ing the inform­a­tion for pub­lish­ing pur­poses. Can you cre­ate and man­age life-cycle work­flows which ration­al­ise or reg­u­lar­ise mixes of formats using XSLT and other XML tool­sets? Should XML be the begin­ning of your pub­lish­ing work­flow, the hub format in the middle, the res­ult, or all three? How can XSLT and related tools be used to cover up the defi­cien­cies or excesses of the source XML? What are the argu­ments for mov­ing authors towards sub­mit­ting in XML (or not)? For mov­ing editors?</p>
<p>Incor­por­at­ing both live examples and war stor­ies, Tony Gra­ham will lead an exam­in­a­tion of XML in pub­lish­ing work­flows, the advant­ages and dis­ad­vant­ages of using XML at each stage, and some of the tools and tech­niques avail­able to you.</p></blockquote>
<p>XML Sum­mer School 2012 is on Septem­ber 16–21 2012 at St Edmund Hall, Oxford Uni­ver­sity.</p>
]]></content:encoded>
			<wfw:commentRss>http://inasmuch.as/2012/09/02/xml-summer-school-2012/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Robbery Under Arms</title>
		<link>http://inasmuch.as/2012/07/11/robbery-under-arms/</link>
		<comments>http://inasmuch.as/2012/07/11/robbery-under-arms/#comments</comments>
		<pubDate>Wed, 11 Jul 2012 21:21:08 +0000</pubDate>
		<dc:creator>tkg</dc:creator>
				<category><![CDATA[Book]]></category>

		<guid isPermaLink="false">http://inasmuch.as/?p=1453</guid>
		<description><![CDATA[Inasmuch as I was in primary school in Australia when I first read it as a dead-tree book, it&#8217;s something of a turn for the books as well as a turn of the books that I&#8217;ve just finished reading Robbery &#8230; <a href="http://inasmuch.as/2012/07/11/robbery-under-arms/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><span style="font-variant: small-caps;">Inasmuch as</span> I was in primary school in Australia when I first read it as a dead-tree book, it&#8217;s something of a turn for the books as well as a turn of the books that I&#8217;ve just finished reading <a title="'Robbery Under Arms' at Wikipedia" href="https://en.wikipedia.org/wiki/Robbery_Under_Arms"><em>Robbery Under Arms</em></a> by Rolf Boldrewood as an EPUB while living and working in Ireland and, now, England.  I think at the time I would have found the medium even more unlikely than the geography, but as the ready availability of EPUB readers has given new life and new audiences to many out-of-copyright books, when I was first stocking up on EPUBs I specifically looked for the EPUB of <em>Robbery Under Arms</em> since I was unlikely to find it the dead-tree version in either an Irish library or an Irish bookstore.</p>
<p><a href="https://en.wikipedia.org/wiki/Bailed_Up"><img class="aligncenter" title="&quot;Bailed Up&quot; by Tom Roberts" src="https://upload.wikimedia.org/wikipedia/commons/8/8a/Bailed_Up.jpg" alt="" width="614" height="447" /></a></p>
<p>&#8220;My name is Dick Marston&#8221; as the opening words of <em>Robbery Under Arms</em> may not have the recognition nor the ring of &#8220;Call me Ishmael&#8221; (though for a great young-adult read, <a title="Don't Call Me Ishmael at Wikipedia, either." href="https://en.wikipedia.org/wiki/Don%27t_Call_Me_Ishmael"><em>Don&#8217;t Call Me Ishmael</em></a>), but it is one of the great Australian novels.  If you want to read the EPUB, a search for &#8216;&#8221;Robbery Under Arms&#8221; EPUB&#8217; will turn up several sources.</p>
]]></content:encoded>
			<wfw:commentRss>http://inasmuch.as/2012/07/11/robbery-under-arms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XML Calabash Ant task</title>
		<link>http://inasmuch.as/2012/05/24/xml-calabash-ant-task/</link>
		<comments>http://inasmuch.as/2012/05/24/xml-calabash-ant-task/#comments</comments>
		<pubDate>Thu, 24 May 2012 16:15:53 +0000</pubDate>
		<dc:creator>tkg</dc:creator>
				<category><![CDATA[XML]]></category>
		<category><![CDATA[Ant]]></category>

		<guid isPermaLink="false">http://inasmuch.as/?p=1434</guid>
		<description><![CDATA[Inasmuch as I&#8217;d been threatening since the XML Summer School last year to do it, I&#8217;ve made a custom Ant task for running XML Calabash, currently only in my fork at git@github.com:MenteaXML/xmlcalabash1.git. You can use this task to process: A &#8230; <a href="http://inasmuch.as/2012/05/24/xml-calabash-ant-task/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><span style="font-variant: small-caps;">Inasmuch as</span> I&#8217;d been threatening since the XML Summer School last year to do it, I&#8217;ve made a custom Ant task for running XML Calabash, currently only in my fork at <a title="MenteaXML/xmlcalabash1.git" href="git@github.com:MenteaXML/xmlcalabash1.git">git@github.com:MenteaXML/xmlcalabash1.git</a>.</p>
<p>You can use this task to process:</p>
<ul>
<li>A single input file to produce a single output file</li>
<li>A set of input files, processed one at a time, to produce a set of output files</li>
<li>Multiple input files as the input to one XProc input port processed to produce a single output file</li>
<li>Any of the above with additional input ports to each of which are applied one or more input files whose file names may be either fixed or mapped from the name(s) of the current main input file(s)</li>
<li>Any of the above with additional output ports whose file names may be either fixed or mapped from the name(s) of the current main input file(s)</li>
<li>Any of the above with Ant defaulting to not running the pipeline when the outputs are already up-to-date compared to the inputs and the pipeline</li>
</ul>
<p>You can also specify options and parameters to be used by the pipeline.<span id="more-1434"></span></p>
<h1>Examples</h1>
<h2>Single input, single output</h2>
<pre>&lt;calabash in="in.xml" out="out1.xml" pipeline="pipeline.xpl"/&gt;</pre>
<p>What could be simpler?</p>
<h2>Implicit fileset plus mapper on additional input port</h2>
<pre>&lt;calabash
    includes="doc.xml"
    inport="source"
    destdir="out"
    extension=".compare.xml"
    pipeline="compare-001.xpl"&gt;
  &lt;input port="alternate"&gt;
    &lt;globmapper from="*.xml" to="*-alt.xml" /&gt;
  &lt;/input&gt;
&lt;/calabash&gt;</pre>
<h2>Fixed input, multiple mapped outputs</h2>
<pre>&lt;calabash
    in="group-003_input1.xml"
    pipeline="group-003_pipeline.xpl"&gt;
  &lt;output port="result"&gt;
    &lt;globmapper from="*_input1.xml" to="out/*_result.xml" /&gt;
  &lt;/output&gt;
  &lt;output port="result2"&gt;
    &lt;globmapper from="*_input1.xml" to="out/*_result2.xml" /&gt;
  &lt;/output&gt;
&lt;/calabash&gt;</pre>
<h2>QNames</h2>
<pre>&lt;calabash in="in.xml" out="out.xml" pipeline="pipeline.xpl"&gt;
  &lt;namespace prefix="hi" uri="low" /&gt;
  &lt;parameter name="<strong>{hi}there</strong>" value="a value" /&gt;
  &lt;parameter name="<strong>hi:there</strong>" value="a value" /&gt;
&lt;/calabash&gt;</pre>
<p><code>{hi}there</code> is a QName in Clark notation, where <code>hi</code> is the namespace URI and <code>there</code> is the local name; whereas <code>hi</code> in <code>hi:there</code> is a namespace prefix that is bound to the <code>low</code> namespace URI.</p>
]]></content:encoded>
			<wfw:commentRss>http://inasmuch.as/2012/05/24/xml-calabash-ant-task/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Emacs mode for Ant build files</title>
		<link>http://inasmuch.as/2012/05/24/emacs-mode-for-ant-build-files/</link>
		<comments>http://inasmuch.as/2012/05/24/emacs-mode-for-ant-build-files/#comments</comments>
		<pubDate>Thu, 24 May 2012 15:56:16 +0000</pubDate>
		<dc:creator>tkg</dc:creator>
				<category><![CDATA[Emacs]]></category>
		<category><![CDATA[RELAX NG]]></category>
		<category><![CDATA[Ant]]></category>

		<guid isPermaLink="false">http://inasmuch.as/?p=1424</guid>
		<description><![CDATA[Inasmuch as it&#8217;s useful, when editing an Ant build file, to have a list of the targets in the file and the ability to jump to any of them, my Ant mode at git@github.com:tkg/ant-mode.git currently only does two things: make &#8230; <a href="http://inasmuch.as/2012/05/24/emacs-mode-for-ant-build-files/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><span style="font-variant: small-caps;">Inasmuch as</span> it&#8217;s useful, when editing an Ant build file, to have a list of the targets in the file and the ability to jump to any of them, my Ant mode at <a title="Emacs mode for Ant build files" href="git@github.com:tkg/ant-mode.git">git@github.com:tkg/ant-mode.git</a> currently only does two things: make a &#8220;Ant&#8221; menu that lists all the targets and associates a RELAX NG compact syntax schema with build files.<span id="more-1424"></span></p>
<p>I had a more fully-featured Ant mode years ago but accidentally lost it when changing machines once, so putting the new mode on GitHub makes it both available to you and harder for me to lose.  The motivation for reinventing it now came from from working with the build files in <a title="MenteaXML/xmlcalabash1" href="https://github.com/MenteaXML/xmlcalabash1">my fork of XML Calabash</a> while I was adding the Ant task for running <a title="XML Calabash" href="http://xmlcalabash.com">XML Calabash</a>.</p>
<p>The current schema bundled with the mode is little more than a translation using Trang of the DTD dumped by <code>&lt;antstructure&gt;</code>, so I know I need to tweak it to make it easier to extend with custom task types, but in the meantime the mode is useful for when you&#8217;re looking at someone else&#8217;s build file (or your own when it&#8217;s grown big enough).</p>
]]></content:encoded>
			<wfw:commentRss>http://inasmuch.as/2012/05/24/emacs-mode-for-ant-build-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>use-when</title>
		<link>http://inasmuch.as/2012/05/13/use-when/</link>
		<comments>http://inasmuch.as/2012/05/13/use-when/#comments</comments>
		<pubDate>Sun, 13 May 2012 18:34:27 +0000</pubDate>
		<dc:creator>tkg</dc:creator>
				<category><![CDATA[XSLT]]></category>

		<guid isPermaLink="false">http://inasmuch.as/?p=1397</guid>
		<description><![CDATA[Inasmuch as use-when is one of the standard attributes in XSLT 2.0 (and later) rather than being on a particular XSLT element, it seldom gets much of a mention; e.g., currently only 568 mentions on the XSL-List according to MarkMail &#8230; <a href="http://inasmuch.as/2012/05/13/use-when/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><span style="font-variant: small-caps;">Inasmuch as</span> <code>use-when</code> is one of the <a title="&quot;Standard attributes&quot; in XSLT 2.0" href="http://www.w3.org/TR/xslt20/#standard-attributes">standard attributes</a> in XSLT 2.0 (and later) rather than being on a particular XSLT element, it seldom gets much of a mention; e.g., currently only <a title="'use-when' in XSL-List messages according to MarkMail" href="http://markmail.org/search/?q=use-when+list%3Axsl-list">568 mentions on the XSL-List according to MarkMail</a> (and some of those are false positives).</p>
<p><code>use-when</code> (and <code>xsl:use-when</code> on non-XSLT elements) is for &#8220;<a title="'Conditional element inclusion' in XSLT 2.0" href="http://www.w3.org/TR/xslt20/#conditional-inclusion">conditional element inclusion</a>&#8221; and is very useful for excluding elements that either aren&#8217;t currently useful or that will cause errors if acted upon.  The <code>use-when</code> in the example below causes the <code>xsl:value-of</code> to be used only when <code>saxon:line-number()</code> is available, thereby avoiding the <code>Saxon extension functions are not available under Saxon-HE</code> message from more recent versions of Saxon HE where <code>saxon:line-number()</code> is no longer available but<code></code> producing a useful result on older Saxon HE versions where the function<code></code> is available.</p>
<pre>&lt;!-- Leftover intermediate elements. --&gt;
&lt;xsl:template match="t:*"&gt;
  &lt;xsl:if test="$debug"&gt;
    &lt;xsl:message&gt;
      &lt;xsl:value-of select="t:node-basename(.)" /&gt;
      &lt;xsl:value-of
        <strong>use-when="function-available('saxon:line-number')"</strong>
        select="concat(':', saxon:line-number())"
        xmlns:saxon="http://saxon.sf.net/" /&gt;
      &lt;xsl:text&gt; :: &lt;/xsl:text&gt;
      &lt;xsl:copy-of select="." /&gt;
    &lt;/xsl:message&gt;
  &lt;/xsl:if&gt;
  &lt;xsl:apply-templates /&gt;
&lt;/xsl:template&gt;</pre>
<p>The <code>use-when</code> expression is evaluated very early in the processing of the stylesheet, and you can&#8217;t use variable references in the expression.  So don&#8217;t be tempted to try:</p>
<pre>&lt;xsl:message use-when="$debug"&gt;
...
&lt;/xsl:message&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://inasmuch.as/2012/05/13/use-when/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting started with Wisent</title>
		<link>http://inasmuch.as/2012/04/25/getting-started-with-wisent/</link>
		<comments>http://inasmuch.as/2012/04/25/getting-started-with-wisent/#comments</comments>
		<pubDate>Wed, 25 Apr 2012 22:28:29 +0000</pubDate>
		<dc:creator>tkg</dc:creator>
				<category><![CDATA[Emacs]]></category>

		<guid isPermaLink="false">http://inasmuch.as/?p=1357</guid>
		<description><![CDATA[Inasmuch as I&#8217;d wanted for a long time to have an excuse to write an Emacs mode that uses a Semantic Wisent parser, I recently started writing a new mode for RELAX NG compact syntax files. The mode-in-progress is available &#8230; <a href="http://inasmuch.as/2012/04/25/getting-started-with-wisent/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><span style="font-variant: small-caps;">Inasmuch as</span> I&#8217;d wanted for a long time to have an excuse to write an Emacs mode that uses a <a title="Adding a new language to Semantic (or vice-versa)" href="http://cedet.sourceforge.net/addlang.shtml">Semantic Wisent parser</a>, I recently started writing a new mode for <a title="RELAX NG home page" href="http://www.relaxng.org/">RELAX NG</a> compact syntax files. The mode-in-progress is available on GitHub at <a title="nrnc-mode on GitHub" href="https://github.com/tkg/nrnc.git">https://github.com/tkg/nrnc.git</a>, and here&#8217;s my thoughts so far on using Wisent:<span id="more-1357"></span></p>
<ul>
<li><strong>Start from the examples in the documentation</strong> – My first attempt at a top-level production was incorrect and failed to match anything, so nothing matched. I eventually resorted to reusing the entire <code>wisent-graphviz-dot-mode</code> parsing code with one added production for RELAX NG compact syntax <code>namespace</code> declarations and built it up from there until I&#8217;d sufficiently got the hang of the productions to remove the remaining <code>wisent-graphviz-dot-mode</code> training wheels and go it alone.</li>
<li><strong>Make sure your syntax table is correct</strong> – The mode was initially based on <a title="rnc-mode download page" href="http://www.pantor.com/download.html"><code>rnc-mode</code></a> by David Rosenberg of Pantor Engineering AB and used the syntax table defined in it. At one point when things weren&#8217;t working, I remembered that the <code>wisent-graphviz-dot-mode</code> code that I&#8217;d been using as an example included a comment about needing to modify the syntax table of <code>graphviz-dot-mode</code>. Sure enough, <code>rnc-mode</code> was missing a syntax-table entry that was needed for Semantic parsing of <code>.rnc</code> files. And just today I had to set the &#8220;<code>?</code>&#8221; character as a symbol character to get one more part working properly.</li>
<li><strong>Use the debug functions</strong> – Forgive me for restating the very, very obvious, but you will find these useful. For example, `<code>semantic-show-unmatched-syntax-mode</code>&#8216; is useful, though initially disheartening, for showing which parts of the file are not being matched by displaying a red line under the unmatched parts. Occasionally, you may also note the absence of the red line under parts that you don&#8217;t expect to be matched yet.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://inasmuch.as/2012/04/25/getting-started-with-wisent/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
