5 <xsl:stylesheet version="1.0"
6 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
7 <xsl:output method="xml"/>
9 <xsl:include href="./modelpreprocess.xsl"/>
11 <xsl:template match="namespace-alias[\@id]">
12 <xsl:variable name="value">
13 <xsl:call-template name="getnamespaceid">
14 <xsl:with-param name="id" select="\@id" />
18 <xsl:apply-templates select="@*"/>
19 <xsl:attribute name="id">
20 <xsl:value-of select="\$value"/>
25 <xsl:template name="getnamespaceid">
26 <xsl:param name='id'/>
32 open ( NAMESPACES
, $ARGV0 ) || die "can't open namespace file: $!";
35 while ( <NAMESPACES
> )
45 elsif ( $_ =~ m/^[^#]/ )
47 # Neither an empty line nor a comment
48 $_ =~ /^[a-zA-Z0-9-_]+$/ or die "Invalid namespace token $_";
52 <xsl:when test="\$id = '$_'">
53 <xsl:text>$no</xsl:text>