Re: [xsl] Using a node-set as a variable

Subject: Re: [xsl] Using a node-set as a variable
From: "Terry Badger terry_badger@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 17 Jan 2019 23:35:25 -0000
Rick,
Here is an example of an item in a large dictionary file of strings that are
used across many documents so it was worth while having this master file:


Terry






On bThursdayb, bJanuaryb b17b, b2019b
b06b:b13b:b24b bPMb bEST, Rick Quatro rick@xxxxxxxxxxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:





Hi,
B 
I am using an XSLT 2 processor and I have a template like this:
B 
B B B  <xsl:template name="parts-head">
B B B B B B B  <parts-head>
B B B B B B B B B B B  <head-row>
B B B B B B B B B B B B B B B  <head-cell>Index No.</head-cell>
B B B B B B B B B B B B B B B  <head-cell>Qty</head-cell>
B B B B B B B B B B B B B B B  <head-cell>U/M</head-cell>
B B B B B B  B B B B B B B B B <head-cell>Part No.</head-cell>
B B B B B B B B B B B B B B B  <head-cell>Component Description</head-cell>
B B B B B B B B B B B B B B B  <head-cell>Shop Order Section</head-cell>
B B B B B B B B B B B  </head-row>
B B B B B B B  </parts-head>
B B B  </xsl:template>
B 
I need to localize each of the <head-cell> elements. I would like to find a
way to have the localized elements, or the entire <parts-head> element in an
external XML file, so I can do the localization there. I do have a language
parameter that I can use to tell which element I need. But I am not sure what
the best practice is here.
B 
I could have my external XML file like this:
B 
B B B  <settings>
B B B B B B B  <parts-head language="en">
B B B B B B B B B B B  <head-row>
B B B B B B B B B B B B B B B  <head-cell>Index No.</head-cell>
B B B B B B B B B B B B B B B  <head-cell>Qty</head-cell>
B B B B B B B B B B B B B B B  <head-cell>U/M</head-cell>
B B B B B B B B B B B B B B B  <head-cell>Part No.</head-cell>
B B B B B B B B B B B B B B B  <head-cell>Component Description</head-cell>
B B B B B B B B B B B B B B B  <head-cell>Shop Order Section</head-cell>
B B B B B B B B B B B  </head-row>
B B B B B B B  </parts-head>
B B B B B B B  <parts-head language="es">
B B B B B B B B B B B  <head-row>
B B B B B B B B B B B B B B B  <head-cell>Span Index No.</head-cell>
B B B B B B B B B B B B B B B  <head-cell>Span Qty</head-cell>
B B B B B B B B B B B B B B B  <head-cell>Span U/M</head-cell>
B B B B B B B B B B B B B B B  <head-cell>Span Part No.</head-cell>
B B B B B B B B B B B B B B B  <head-cell>Span Component
Description</head-cell>
B B B B B B B B B B B B B B B  <head-cell>Span Shop Order Section</head-cell>
B B B B B B B B B B B  </head-row>
B B B B B B B  </parts-head>
B B B  <settings>
B 
and read this into a global variable. But then how do I insert the desired
<parts-head> element into my output? Thank you for any suggestions.
B 
Rick
B 
Rick Quatro
Carmen Publishing Inc.
rick@xxxxxxxxxxxxxxx
585-729-6746
www.frameexpert.com/store/
B 
Save on energy at quatro.mystream.com
B 
B 


B B XSL-List info and archive
EasyUnsubscribe (by email)

Current Thread