xsl-list
[Top] [All Lists]

Re: [xsl] Filename encoding

2009-10-21 06:15:38
 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(_at_)tverskov(_dot_)dk> 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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>