Subject: internationalization via XSL From: Chris Tomlinson <chris@xxxxxxxxxxxx> Date: Thu, 21 Jan 1999 10:35:21 -0600 |
I have some questions regarding mapping an xml document to different languages via XSL processing, which I assume is a reasonable use of XSL. I also assume that there are idioms of usage that cover such needs but I haven't seen any discussion of this Suppose I have an xml fragment: <mapped-key>surname</mapped-key> and I want to use XSL to transform this to: lastname if operating in language 'en' and country 'US', to: surname for 'en'/'GB', and nom de famille for 'fr'. I expect to have 1) language mapping files that can be named; and 2) some way of conveying to the XSL processor from a controlling application what the language and country codes are for an instance of processing. What is the canonical way to accomplish 1) and 2) above using XML/XSL? I assume that 2) is accomplished by having the controlling application establish an initial set of constants when the XSL processor is started and is thus an implementation matter. What I'm not sure of is what sort of mechanism would be used to handle essentially name/value pairs. Would each language mapping file be an XML document? Is there then some way to express in XSL substituting a fragment from one tree (the language mapping tree) into the resulting tree during a walk of the 'input' xml document? That is can XSL be used to pluck pieces from one tree based on nodes in a second tree. Is a proper approach to include language/country specific stylesheet components? Sorry if this is a bit confused. I have built a prototype of an ad hoc xml based template system and I see how to accomplish most of the functionality via XSL. Thanks and ciao, Christine Tomlinson XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: A general pattern match, G. Ken Holman | Thread | Re: internationalization via XSL, Nigel Hutchison |
Match pattern, Oren Ben-Kiki | Date | Re: Match pattern, Keith Visco |
Month |