Excuse my ignorance, but is the XML transformation to <whatever> 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.
- - - - - -
<p>
The second form of conflict resolution is often
called <firstuse>optimistic locking</firstuse>, although it
really is no locking at all.<indexterm>
<i1>Locking</i1>
<i2>optimistic</i2>
</indexterm><indexterm>
<i1>Optimistic locking</i1>
</indexterm><indexterm>
<i1>Merge</i1>
<i2>automatic on update</i2>
</indexterm>
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 <filename>File1.java</filename>:
</p>
<programlisting language="java" number="yes">
public class File1 {
public String getName() {
return "Wibble";
}
public int getSize() {
return 42;
}
}
</programlisting>
<p>
Wilma and Fred both check this file out. Fred changes line 3:
</p>
- - - -
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