contribute:multilanguage support or multiple files

Subject: contribute:multilanguage support or multiple files
From: juggy@xxxxxxx
Date: Sun, 11 Jun 2000 02:14:37 +0200
Hi there,

I finally found the solution to the problem I mentioned in my 
previous posts. I just thought, someone could use this.
The problem was to have a data xml file, a language xml file and a 
xsl layout file and have these combined appropriately.

This ist test1.xml, the data file:
<?xml version="1.0"?>

<?xml-stylesheet type="text/xsl" href="test1.xsl" 


	<Eintrag id="1">300</Eintrag>

	<Eintrag id="2">23,42</Eintrag>

	<Eintrag id="3">4711</Eintrag>

This is test1l.xml, the language data file:
<?xml version="1.0"?>


     <Element id="1" spr="de">Kosten</Element>

     <Element id="2" spr="de">Rueckstellung</Element>

     <Element id="3" spr="de">Gesamt</Element>

     <Element id="1" spr="en">Costs</Element>

     <Element id="2" spr="en">Return</Element>

     <Element id="3" spr="en">Total</Element>


This is test1.xsl, the layout file:

  <xsl:output method="html" indent="yes"/>

  <xsl:param name="Sprache" select="'en'"/>

  <xsl:variable name="file">test1l.xml</xsl:variable>

  <xsl:variable name="phrases" 

  <xsl:variable name="complete" 
select="concat($phrases, '/', $Sprache)"/>

  <xsl:template match="/">






  		language: <xsl:value-of select="$Sprache"/>


		<table border="1">

		<xsl:for-each select="/Daten/Eintrag">


			<xsl:variable name="actID" select="@id"/>

select="$phrases/Element[@id=$actID and 









You then just call it via
saxon.exe test1.xml test1.xsl Sprache=en

(Sprache is the language parameter)

Maybe someone can use it.



 XSL-List info and archive:

Current Thread