[tei-council] Today's little puzzle
Martin Holmes
mholmes at uvic.ca
Wed Apr 24 20:34:17 EDT 2013
I think there may be a little flaw in yore cunning plan.
The stuff that I'm doing involves counting (for instance) the
<elementSpec>s to find out how many elements there are. However, if I do
this at the same time as expand.xsl is doing the XIncludes, I won't find
any <elementSpec>s, because they don't get included until after the
XIncludes get processed.
So we're going to have to have two distinct steps:
1. Xinclude to build p5.xml or p5subset.xml (what's the difference?)
2. XSLT to expand the PIs and fill in the missing content.
So we might as well use xmllint for the XIncludes and save ten seconds, no?
Or am I missing something?
Cheers,
Martin
On 13-04-24 03:16 PM, Sebastian Rahtz wrote:
>
> On 24 Apr 2013, at 21:02, Martin Holmes <mholmes at uvic.ca>
> wrote:
>
>> I have seen that, but it's hard to figure out how it applies to the
>> Guidelines. They have their own guidelines.xsl.model; that gets renamed
>> to guidelines.xsl and changed a bit before use, such that instead of
>> importing
>> http://www.tei-c.org/release/xml/tei/stylesheet/odds2/odd2html.xsl it
>> imports the local copy in your TEI install -- or possibly the version
>> from the repo if you supplied that as a parameter
>
> yeah, thats a bit devious, I agree. I could recast that as a profile
> called "teiguidelines" which might be sensible. I will try and get to that.
>
>>
>> With regard to the suggestion for a pre-processing step: xmllint is
>> wicked fast at doing XIncludes, and I bet there would be a noticeable
>> time penalty if we were to do them with XSLT
> a bit. it takes 3 seconds starting from cold, but thats loading a JVM.
> If it was just another job in the Ant script, probably only adds a few seconds or two
>
>> , but if we could achieve a
>> lot of other work at the same time it might be worth it.
>
> I have done it anyway, as easy to do as to discuss.
> the change took the build time from 2min 29sec to 2 min39 sec,
> so seems safe. that should let you implement whatever you like
> in Utilities/expand.xsl
>
> see antbuilder.xml for the sequence of events. this pleases me,
> cos it takes more and more magic out of the Unix-specific Makefile
> into the ant scripts which are easier to understand, I hope.
> --
> Sebastian Rahtz
> Director (Research) of Academic IT
> University of Oxford IT Services
> 13 Banbury Road, Oxford OX2 6NN. Phone +44 1865 283431
>
More information about the tei-council
mailing list