[tei-council] egXML

Conal Tuohy Conal.Tuohy at vuw.ac.nz
Wed Jan 24 19:18:34 EST 2007


> Conal Tuohy wrote:
> > I don't want to quibble about it, especially given that it actually
> > works - I just want to understand it. What I haven't 
> grasped is why the
> > "funny" namespace is needed at all. What I mean is, why 
> can't the egXML
> > element and its content all just be in the regular TEI namespace?
> >
> >   
> practically, because it would play merry hell
> with validation and processing. A simple
> thing like  <xsl:number level="any"/> for  processing <note>
> will meet the <note> inside the examples. It
> may sound lazy, but when we set this up
> I couldnt see any other way forward. Its trying
> to make it very clear that this is an island
> of oddity where normal rules do not apply.

Hmmm ... I see what you mean. Otherwise you would need to complicate any
such expression like so:

<xsl:number level="any" count="note[not(ancestor::egXML)]"/>

So that makes sense.

What still concerns me a little though is that the ODD language itself
has been slightly weirded in order to gain this simplicity in
processing. Personally I think it'd be better if ODD were simpler, even
at the expense of some extra processing, either by complicating various
XPath expressions (as above), or else by introducing a processing stage
to "denormalise" the ODD before regular processing. e.g. something like:

<!-- 
	Move tei:egXML and any other TEI elements 
	it contains into an "example" namespace
-->
<xsl:stylesheet 
	version="1.0" 
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
	xmlns:tei="http://www.tei-c.org/ns/1.0/"
	xmlns="http://www.tei-c.org/ns/Examples">

	<xsl:template match="tei:egXML/descendant-or-self::tei:*">
		<xsl:element
			name="local-name()" 
			namespace="http://www.tei-c.org/ns/Examples">
			<xsl:apply-templates/>
		</xsl:element>
	</xsl:template>

	<xsl:template match="node()|@*">
		<xsl:copy>
		      <xsl:apply-templates/>
		</xsl:copy>
	</xsl:template>

</xsl:stylesheet>

WDYT?

But this is a distraction really ... I understand the point of the
"example" namespace so I will shut up now :-)

Con



More information about the tei-council mailing list