Yesterday, Scott and I had a meeting arising out of our disagreement about a conference presentation on this blogging system. We cordially agreed to disagree, and Scott asked me to post my comments and opinions about this and related issues here. These are my feelings about conference presentations relating to our projects. They do not represent the position of the HCMC or anyone else.
- In the last couple of years, I think the balance between doing work and talking about work has become a bit skewed; we've done too much talking (in terms of meetings, presentations, conference travel etc.) and not enough actual useful work.
- We should make presentations only on substantial, innovative projects which are pretty much completed, and which we have good reason to be proud of. We shouldn't present on brand-new, half-finished, trivial, or "piloted" projects; we shouldn't present on promises or plans for what we might do when and if some grant money shows up, or on what we did to get some grant money. If we don't actually have any projects which meet these criteria, we should shut up, stay at home, and get on with project work until we do have some. This would save us a lot of expense, and also increase the amount of time we spend doing useful work in the office.
- It can be argued (and I think this is Scott's position) that we have a duty to get out there and raise the profile of our centre, so there must be a steady stream of public woffling even when there's not much to woffle about. However, I feel that presenting on trivial or half-finished work actually diminishes rather than enhances our reputation.
- Only the people closely involved with a project should publish or write about it. A good indicator of whether you're in this position with regard to a specific project would be if you're capable of writing a good paper on it without asking for explanations, help, or "clarification" from other people about what it does and how it works.
- There is a good place for talking publicly about work-in-progress and reporting on projects which are not yet finished: this blogging system. Anyone who wants to know about (say) what we've done to customize B2Evo to make it work the way we want it to, or how we're learning to build our work habits and documentation around it, can read the lengthy project history in the posts on its blog; there's no need to travel vast distances to talk about it. When a project is mature (meaning that the project itself is non-trivial, some significant milestone has been surpassed, there is a real-world non-beta functioning public product, and enough time has passed for useful assessment of same), then a presentation is probably appropriate.
I would reiterate that these are only my own opinions, and Scott and I disagree about much of this stuff. The disagreement is friendly and the debate it has raised has helped me, at least, clarify my own ideas and feelings about the role of HCMC and our responsibilities towards the people we work with.
This post includes the minutes spent drafting this post. Now back to proper work!
Received a set of test files from Syd, ran the tests, and sent back the following report:
[quote]
I've attached the results of running each of your tests on each of your relevant files (under Windows using oXygen). This is a summary:
"Correct" output:
tP4_tB14_Xalan
tP5_tA1_Xsltproc
tP5_tA1_Saxon_6
tP5_tA1_Xalan
tP5_tA2_Saxon_8
tP5_tB15_Saxon_6
tP5_tB15_Xalan
tP5_tB15_Xsltproc
tP5_tB25_Saxon_8
tP5_sans_tB15_Xalan
XMLNS added to root, but some empty xmlns="" attributes:
tP4_tB14_Saxon_6
tP4_tB24_Saxon_8
tP4_tB14_Xsltproc
tP5_sans_tB15_Saxon_6
tP5_sans_tB15_Xsltproc
tP5_sans_tB25_Saxon_8
No XMLNS anywhere:
tP4_tA1_Saxon_6
tP4_tA1_Xalan
tP4_tA1_Xsltproc
tP4_tA2_Saxon_8
tP5_sans_tA1_Xsltproc
tP5_sans_tA1_Saxon_6
tP5_sans_tA1_Xalan
tP5_sans_tA2_Saxon_8
[end quote]
Syd will also test, and take results to some gurus he's meeting today. We need to know a) what we SHOULD be doing, b) under what circumstances that actually works, and c) where it doesn't work, what workarounds are available.
Installed all old versions of HotPot under a vm, and began looking at docs and code. Found some interesting stuff in the help files. All versions still work! Had some correspondence with Martin Dougiamas about the open-source model and revenue streams for Moodle.
This work grows out of the conversions I've been doing for P4 TEI to P5, on several projects (including ScanCan, EMLS and ultimately ACH). The TEI provides some sample stylesheets which take an approach to conversion which keeps the output free of any namespacing until right at the end, when a final stylesheet attempts to add the namespace . I was having trouble with this stylesheet, written by Syd Bauman, and began working with him on developing a test case we can use to get some serious advice about the best approach. This morning I worked through some basic tests, and reported as follows to Syd:
I've been trying to figure this one out, and a core problem is that you can't create a valid TEI P5 document which links to a schema (XSD file) but is not already in a namespace. I've done that for the purposes of testing.
Here's the minimal document:
<?xml version="1.0" encoding="UTF-8"?>
<TEI>
<teiHeader>
<fileDesc>
<titleStmt>
<title>Minimal test document</title>
</titleStmt>
<publicationStmt><p>Unpublished</p></publicationStmt>
<sourceDesc><p>This electronic file is the original document.</p></sourceDesc>
</fileDesc>
</teiHeader>
<text><body>
<head>Minimal test document</head>
<p>This is an absolute minimal test document for P5 XSLT processing.</p>
</body></text>
</TEI>
Here's the minimal stylesheet:
<?xml version="1.0"?>
<!-- One variation is to switch between version 2.0 and 1.0. -->
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.tei-c.org/ns/1.0">
<!-- Another variation is to uncomment the template below. -->
<!--
<xsl:template match="TEI">
<xsl:element name="TEI" namespace="http://www.tei-c.org/ns/1.0">
<xsl:apply-templates />
</xsl:element>
</xsl:template>
-->
<!-- XSLT Template to copy anything, priority="-1" -->
<xsl:template match="@*|node()|text()|comment()|processing-instruction()" priority="-1">
<xsl:copy>
<xsl:apply-templates select="@*|node()|text()|comment()|processing-instruction()"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
Here are my results, testing under oXygen:
1. With ONLY the copy-anything template:
-No xmlns attribute is added to the root under any of the following circumstances:
-XSLT 1.0 under Xalan, xsltproc, or Saxon 6.
-XSLT 2.0 under Saxon 8.
2. With the TEI match template enabled:
-XSLT 2.0 under Saxon 8: The xmlns attribute IS added to the root, but empty xmlns attributes are also added to its two child nodes (teiHeader and text).
-XSLT 1.0 under Saxon 6: Ditto.
-XSLT 1.0 under xsltproc: Ditto.
-XSLT 1.0 under Xalan: YES! "Correct" result; xmlns attributes is added to root, but NO empty xmlns attributes appear below.
So the situation seems to be that only with XSLT 1.0 under Xalan can we get the result we want, and we can only achieve that by matching the root node and adding a namespace attribute to the xsl:element tag.
Now we try using the apparently-wrong (according to our research) method, where the stylesheet looks like this:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="TEI">
<xsl:element name="TEI">
<xsl:attribute name="xmlns">http://www.tei-c.org/ns/1.0</xsl:attribute>
<xsl:apply-templates />
</xsl:element>
</xsl:template>
<!-- XSLT Template to copy anything, priority="-1" -->
<xsl:template match="@*|node()|text()|comment()|processing-instruction()" priority="-1">
<xsl:copy>
<xsl:apply-templates select="@*|node()|text()|comment()|processing-instruction()"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
Results:
-XSLT 2.0 under Saxon 8: Invalid XSLT -- xmlns is not allowed as an attribute name.
-XSLT 1.0 under Saxon 6: No attribute is added. File is unchanged.
-XSLT 1.0 under Xalan: Ditto.
-XSLT 1.0 under xsltproc: Namespace IS added.
So in this case, the only working setup is with xsltproc.
It seems to me there's no reliable way to do this right now, so practically speaking, perhaps the whole approach of generating elements not in a namespace and then trying to put them in a namespace at the end is, if not wrong, then impractical. Perhaps all the stylesheets should carry the xmlns attribute in their root elements just so it's always the default namespace for output right through the process. I haven't tested that, though.
I hope this helps. Let me know if you find any different results, or if the gurus can give you a straight answer about this!