You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by rlipi <rl...@centrum.cz> on 2004/06/01 13:43:50 UTC

RE: FW: case insensitive transformation

Hi Oleg,

I'm sorry but it's not as easy for me as you think. I know what XML is
and what XSLT does. But I have only general ideas. I don't know how to
write such XSL transformation. I have found only how to transform
content of elements but I haven't found how to transform element and
attribute names.

Could you help, please?

Lipi


> -----Original Message-----
> From: Oleg Dulin [mailto:oleg@configurecode.com]
> Sent: Friday, May 28, 2004 4:03 PM
> To: 'rlipi'; xalan-j-users@xml.apache.org
> Subject: RE: FW: case insensitive transformation
> 
> You could just write a simple XSL that does this transformation.
> 
> Or feed your input through sed or something.
> 
> Oleg
> 
> -----Original Message-----
> From: rlipi [mailto:rlipi@centrum.cz]
> Sent: Friday, May 28, 2004 9:56 AM
> To: xalan-j-users@xml.apache.org
> Subject: RE: FW: case insensitive transformation
> 
> > -----Original Message-----
> > From: Joseph Kesselman [mailto:keshlam@us.ibm.com]
> > Sent: Friday, May 28, 2004 3:32 PM
> > To: rlipi
> > Cc: xalan-j-users@xml.apache.org
> > Subject: Re: FW: case insensitive transformation
> >
> >
> >
> >
> >
> > Brief answer: No, XSLT and Xalan have no case-insensitive mode, and
I
> > don't
> > think it would be appropriate to add one.
> >
> > You can achieve this result, if you really need it, by rewriting all
> your
> > match and select expressions to perform explicit string tests on
node
> > names
> > in the predicates rather than using normal name-and-axis steps. For
> > example, you could replace "@foo" with something like
> >
> >       "@*["FOO"=translate(local-name(),
> >                   "abcdefghijklmnopqrstuvwxyz",
> >                   "ABCDEFGHIJKLMNOPQRSTUVWXYZ")]
> >
> > A better answer might be to run your source document through a case-
> > folding
> > filter before styling it.
> >
> 
> I agree. I need to transform all element and attribute names to lower
> case. Do you know about any particular case-folding filter that
supports
> it?
> 
> Thank you,
> Lipi.
> 
> > An even better answer would be to fix the source document. Case is
> > meaningful in XML. Get used to that, because XSLT is far from the
only
> > tool
> > which will complain when you're sloppy.
> >
> >
> > ______________________________________
> > Joe Kesselman, IBM Next-Generation Web Technologies: XML, XSL and
> more.
> > "The world changed profoundly and unpredictably the day Tim Berners
> Lee
> > got bitten by a radioactive spider." -- Rafe Culpin, in r.m.filk
> >
> 
>