Re: [xsl] Using xsl:key

Subject: Re: [xsl] Using xsl:key
From: siarom egrub <egrubs@xxxxxxxxx>
Date: Thu, 30 Nov 2006 19:00:47 -0800 (PST)

Thanks for responding! I will provide more

The way I have it setup is as follows:

I am going to call this XML snippet the master XML
because it calls the other language spaecific XMLs.
This is because I want one PDF output with all

<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet href="PCALetters.xsl"
<!DOCTYPE RegLetter PUBLIC "-//SE Inc//DTD Regulatory
Letters XML//EN" "letters.dtd" [
<!ENTITY T11-30-06S030132023_EN SYSTEM
<!ENTITY T11-30-06S030132023_DE SYSTEM
<!ENTITY T11-30-06S030132023_FR SYSTEM
<!ENTITY T11-30-06S030132023_IT SYSTEM

<RegLetter docpartnum="T11-30-06S" watermark="no"
           <graphic fileref="seilogo.eps"/>
       <madeIn>Made in </madeIn>
       <copyright>&copy; Copyright...</copyright>
       <printedIn>Printed in </printedIn>
         <addressline>B...4800 Harbor


This is a snippet of the English XML file (first
output in the PDF)

<?xml version="1.0" encoding="iso-8859-1"?>
<lang type="EN">
        <term id="caution" text="CAUTION"/>
        <term id="warning" text="WARNING"/>
        <term id="notice" text="NOTICE"/>
      <warning><para>Missing translation...(Testing

German XML snippet (2nd output in the PDF) 

<?xml version="1.0" encoding="iso-8859-1"?>
<lang type="DE">
       <term id="caution" text="WARNHINWEIS"/>
       <term id="warning" text="WARNUNG"/>
       <term id="notice" text="HINWEIS"/>
     <warning><para>Missing translation...(Testing

French XML snippet (3rd output in the PDF) 

<?xml version="1.0" encoding="iso-8859-1"?>
<lang type="FR">
        <term id="caution" text="ATTENTION"/>
        <term id="warning" text="AVERTISSEMENT"/>
        <term id="notice" text="REMARQUE"/>
     <warning><para>Missing translation...(Testing

Italian XML snippet (4th output in the PDF) 

<?xml version="1.0" encoding="iso-8859-1"?>
<lang type="IT">
         <term id="caution" text="ATTENZIONE"/>
         <term id="warning" text="AVVERTENZA"/>
         <term id="notice" text="AVVISO"/>
      <warning><para>Missing translation...(Testing

There are more languages with the same concept.

Here is the XSL Snippet:

<!--This is declared at the top of the FO style
<xsl:key name="terms" match="term" use="@id"/>
  <xsl:template match="/">

<xsl:template match="warning">
  <fo:block text-align="center">
     <fo:table border-style="solid" border-width="1pt"
       <fo:table-column column-width="75%"/>
           <fo:table-cell padding-top="2mm">
             <fo:block text-align="center"
content-width=".3in" src="warning.eps"/> 	            
                   <xsl:value-of select="@text"/>
           <fo:table-cell padding-top="2mm"
padding-bottom="2mm" text-align="justify"
start-indent="2mm" end-indent="2mm">

Thanks again!

--- David Carlisle <davidc@xxxxxxxxx> wrote:

> you don't show enough of your input to really help. 
> In particular,
> where do you have the entity references?  (you show
> them appearng
> immediately after the entity declaration, but that
> presumably isn't
> where they appear. Also where in the XML do you
> record which are the
> german texts and which are the english ones?  The
> entity names end in
> _DE and _EN but entities are expanded _before_ XSLT
> starts, they are
> just a macro pre-processor syntax. So XSLT just sees
> the XML that
> results from expanding the entities and never sees
> the entity names.
> So, somewhere in your source xml or your stylesheet
> you must have a
> syntax that specifies which language you want, and
> somewhere in your xml
> that holds the language texts, you must have some
> syntax to say which
> language it is for. The details of what XSLT you use
> to tie these
> together depend on the details of where the
> information is specified,
> but you haven't given any information.
> David

Cheap talk?
Check out Yahoo! Messenger's low PC-to-Phone call rates.

Current Thread