This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

selective matching


I got an xml like following :
<TEXT xml:lang='en'>
      <LABEL label_id="1">Admin Password</LABEL>
      <LABEL label_id="2">New ADMIN Password</LABEL>
      <LABEL label_id="3">Password :</LABEL>
      <LABEL label_id="4">Confirm Password :</LABEL>
      <LABEL label_id="5">Apply</LABEL>
  </TEXT>
...

What I want to do is :
xsl :

<xsl:template match="TEXT">
  <xt:document method="html" href="{$file}_{@xml:lang}.{$extension}">
    /* some html code */
    <xsl:apply-templates/> /* i want to put label1 here */
    /* some html code */
   <xsl:apply-templates/> /* i want to put label2 here */
    /* some html code */
   <xsl:apply-templates/> /* i want to put label3 here */
    /* some html code */
   <xsl:apply-templates/> /* i want to put label4 here */
    /* some html code */
   <xsl:apply-templates/> /* i want to put label5 here */
    /* some html code */
  </xt:document>
</xsl:template>

The whole idea is to substitute labels (some text in natural language) in html
pages by their traduction in another language, leaving html code untouched.

This xsl processing matches all the labels at each time (which is right
according to what is written
but that's not what I tempted to do...)

I already got a way to do that : i divide the whole html page into blocks (with
<BLOCK> tags in the xml
file) but I'm wondering if there is an easier way to do that by specifying
which labels to put at a given place.

I hope it was clear enough...

Any help would be GREATLY appreciated...

Benj.




 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]