From: Dave Thomas Date: 2004-03-06T01:55:25+09:00 Subject: Re: pickaxe with pics? On Mar 5, 2004, at 9:02, Jim Freeze wrote: >> Books written for the Pragmatic Bookshelf now are written in XML, with >> code inclusion. The XML is converted to PDFs using XSLT to generate >> TeX, and then a set of macros in TeX to generate Postscript/PDF. We >> still haven't found anything that generates nicer typeset output. >> >> The same XMLs can be transformed (again, using XSLT) to HTML. > > > Excuse my ignorance, but is the XML transformation to via > XLST done with Ruby code? If so, is this something that ships > with Ruby or can be downloaded? > Jim: It's just standard XSLT: we're using xsltproc to do it at the moment, but any XSLT process would do. > Also, do you have a small snippet of XML, XLST and code to show > the process in action? It's hard to show too much, but here's some markup from the version control book. - - - - - -

The second form of conflict resolution is often called optimistic locking, although it really is no locking at all. Locking optimistic Optimistic locking Merge automatic on update Here, every developer gets to edit any checked out file: the files are checked out in a read/write state. However, the repository will not allow you to check in a file that has been updated in the repository since you last checked it out. Instead, it asks you to update your local copy of the file to include the latest repository changes before checking in. This is where the cleverness lies. Instead of simply overwriting all your hard work with the latest repository version of the file, the version control system attempts to merge the repository changes with your changes. For example, let's look at File1.java:

public class File1 { public String getName() { return "Wibble"; } public int getSize() { return 42; } }

Wilma and Fred both check this file out. Fred changes line 3:

- - - - This isn't strict XML: these files get fed through a preprocessor which handles all the code markup and so on. It also gives us cross reference and callout facilities into the code. The XSLT is pretty straightforward, and generates LaTeX (for PDF generation). Cheers Dave