Subject: Re: [xsl] Filename encoding From: Wolfgang Laun <wolfgang.laun@xxxxxxxxx> Date: Wed, 21 Oct 2009 12:15:13 +0200 |
Changing the filenames in the filesystem doesn't sound right to me. Would it not be simpler to establish (symbolic) links, parallel to the existing directory entries (in a separate directory)? Perhaps it would even be possible to generate the XML using the additional links, which avaods the problem of transforming the XML in the first place. If not, I'd use the XSLT function fn:translate to encode file names. This function is readily available in sed and Perl (or could be easily implemented). Base 64 uses '/', which is likely to be a problem in a file name. -W On Wed, Oct 21, 2009 at 11:15 AM, Jesper Tverskov <jesper@xxxxxxxxxxx> wrote: > Hi list > > Let us say I'm making a quiz for the net using thousands of images. > Users will have to guess what the image is. It could be a flag of some > country. I don't want the name of the img file to give the answer > away. > > I will have to change the img filenames of all the img files in the > filesystem using a general purpose programming language. But it would > be nice if I can use XSLT to transform a document containing all the > original image filenames to a new document with the new names. > > That is I'm looking for a method that will come up with the same new > names for the XSLT part of the project and for the general purpose > programming language part of the project. > > One approach could be to rename the files using base64Binary (Saxon > has an extension function for that), except that I don't know if the > new names will always work as filenames? > > What other or better approaches do we have, something that will be > easy to implement in both the XSLT and in the general purpose > programming language part of the project? > > Cheers > Jesper Tverskov > > http://www.xmlkurser.dk > http://www.xmlplease.com
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Filename encoding, Jesper Tverskov | Thread | Re: [xsl] Filename encoding, David Carlisle |
[xsl] Filename encoding, Jesper Tverskov | Date | Re: [xsl] Filename encoding, David Carlisle |
Month |