Thanks Michael
I suppose my question would now be, what advantage does XML/XSL have
over an XML (or tab separated list) and a Perl script in this example.
Thanks
Andy
On Mon, 2004-12-06 at 12:45 +0000, Michael Kay wrote:
> XSLT can handle this without any problems, though you do need a driver
> application of some kind to handle the returned form.
>
> The display side is bread-and-buffer for XSLT, no problems here at
> all.
>
> On the editing side, there are two minor complications:
>
> (a) you will need a server-side script of some kind to handle the
> posted
> request, extract the parameters, and invoke an XSLT transformation
>
> (b) XSLT works by modifying the old version of the XML to create a
> complete
> new version. This may be inefficient if the file is very large and you
> are
> only changing one value; and you will also need to think about how to
> manage
> the files as they change (for example, do you need to keep the old
> copy as a
> backup, and if so, for how long).
>
> However, neither of these is a serious obstacle.
>
> Michael Kay
> http://www.saxonica.com/
>
> > -----Original Message-----
> > From: Andy Ford [mailto:andy.ford@xxxxxxxxxxxxxx]
> > Sent: 06 December 2004 11:30
> > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> > Subject: RE: XML/XSLT reading
> >
> > Thanks Michael
> >
> > I am putting together a language file/xml tree that will
> > allow a user to
> > read a site in French (FR), English (EN) etc etc. I
> > originally had it as
> > a tab separated list that was read in by Perl, and then decided to
> > change it to XML and get XSL to do the formatting.
> > Languages that have no value for the element will default to
> > English for
> > the user.
> >
> > So, on one part of the site, the user will select his/her language
> to
> > use. This is then written to a user specific config. I would need
> the
> > XSL file to read in the config file to know which language to
> display
> > (alonside the English version) in the languages file i.e. If they
> have
> > chosen French, use XSL to format the XML file to display the
> > English and
> > then the French alongside so they can alter the French version of
> that
> > word/phrase to display on the site. This is a simple process
> > in Perl but
> > I need to understand XML/XSLT to determine whether It can be of use
> in
> > this example.
> >
> > The XML tree structure is this ...
> >
> > <languages>
> > <script>GLOBAL
> > <var>CHOOSE_A_LANGUAGE
> > <string lang='EN'>Please choose a language</string>
> > <string lang='ES'>Elija un idioma por favor</string>
> > <string lang='FI'>Valitse kieli</string>
> > <string lang='IT'>Per favore, scegli una lingua</string>
> > <string lang='NL'>Selecteer een taal</string>
> > <string lang='PT'>Escolha um idioma</string>
> > <string lang='FR'></string>
> > <string lang='NO'></string>
> > </var>
> > <var>GOLD
> > <string lang ='DE'></string>
> > <string lang ='DK'></string>
> > <string lang ='EN'>Gold</string>
> > <string lang ='ES'></string>
> > <string lang ='FI'></string>
> > <string lang ='FR'>Or</string>
> > <string lang ='IT'></string>
> > <string lang ='NL'></string>
> > <string lang ='NO'></string>
> > <string lang ='PT'></string>
> > <string lang ='SE'></string>
> > </var>
> > </script>
> > </languages>
> >
> > So reitterating on what I have above, the user would see
> > something like
> > this ...
> >
> > CHOOSE_A_LANGUAGE
> > EN: Please choose a language
> > FR: [ ]
> >
> > GOLD
> > EN: Gold
> > FR: [Or ]
> >
> > [Submit changes button]
> >
> > And update the XML file with the French version when they
> > enter the text
> > and click on the 'Submit button'
> >
> > I undertand now that I will need another script to post the data to
> so
> > it can modify the XML file (apparently XSL can't do this directly!)
> >
> > What do you suggest?
> >
> > Thanks for listening
> >
> > Andy
> >
> > perl -e "print qq^bIG VeRN ! ^^qq^#'#Yv#=<D+ ^"
> >
> > On Mon, 2004-12-06 at 11:16 +0000, Michael Kay wrote:
> > > > Can anyone provide me with some useful URLs so I can read up
> > > > on how and where XML and XSL is used ( in the real world ).
> > >
> > > You'll find any number of pieces giving a local perspective on
> this,
> > > but I'm
> > > not aware of anything that you'll find useful to address
> > the question
> > > below.
> > >
> > > > I have a very specific
> > > > use which I am now implementing in Perl as I can't see a
> > > > valid reason to use XML/XSL.
> > >
> > > I can think of many problems that would be better programmed in
> Perl
> > > than in
> > > XSLT, so this shouldn't be a worry. But you wouldn't be posting
> here
> > > unless
> > > you were uncertain of your decision. So explain it here,
> > and let's see
> > > if
> > > other people agree with your choice.
> > >
> > > Michael Kay
> > > http://www.saxonica.com/
> > >
> > >
> > >
> >
> > This e-mail is private and may be confidential and is for the
> > intended recipient only. If misdirected, please notify us by
> > telephone and confirm that it has been deleted from your
> > system and any copies destroyed. If you are not the intended
> > recipient you are strictly prohibited from using, printing,
> > copying, distributing or disseminating this e-mail or any
> > information contained in it. We use reasonable endeavours to
> > virus scan all e-mails leaving the Company but no warranty is
> > given that this e-mail and any attachments are virus free.
> > You should undertake your own virus checking. The right to
> > monitor e-mail communications through our network is reserved by us.
>
>
>
--
perl -e "print qq^bIG VeRN ! ^^qq^#'#Yv#=<D+ ^"
|