You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Joerg Heinicke <jo...@gmx.de> on 2002/08/02 18:40:58 UTC

Re: XSLT select: does case matter in tag cames?

Yes, in the whole XML world size matters. The behaviour you describe is 
really strange. It never encountered to me.

Regards,

Joerg

Alan Hodgkinson wrote:
> Dear All,
> 
> WARNING: I'm a Cocoon newbie..
> 
> I'm implementing an XSLT transformation that generates HTML 
>>from XML.
> 
> It all works fine except that the XML that gets generated has 
> some tags with names in upper case (Yeah, it's lame. I'm 
> trying to extend somone else's code). 
> 
> When using my Cocoon pipeline and XSLT sheet, and tries to 
> match on those tags using a select with the upper case version 
> of the tag name, it never matches. However, when I try matching 
> with lower case to so the select, it works fine.
> 
> E.g. in the generated XML I have:
> 
>   <category>
>     <NAME>some name</NAME>
>     ...
> 
> In my XSLT sheet, I have:
> 
>  <xsl:template ..that matches on 'category'..
>    <xsl:value-of select="NAME">
> 
> This never matches unless I use the string "name", instead of
> "NAME" in the select. This wouldn't bother me, except that when
> I'm debugging the XSLT transformation on the command line, the
> lower case doesn't match.
> 
>>>From what I remember of XML and XSLT (the xalan processor anyways), 
> size matters ;). Is there some Cocoon 'feature' or 'option' that's 
> tryng to help me out?
> 
> Many thanks in advance,
> 
> Alan Hodgkinson
> Luzern, Switzerland

-- 

System Development
VIRBUS AG
Fon  +49(0)341-979-7419
Fax  +49(0)341-979-7409
joerg.heinicke@virbus.de
www.virbus.de


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


RE: XSLT select: does case matter in tag cames?

Posted by Vadim Gritsenko <va...@verizon.net>.
> From: Joerg Heinicke [mailto:joerg.heinicke@gmx.de]
> 
> Yes, in the whole XML world size matters. The behaviour you describe
is
> really strange. It never encountered to me.

Ditto, size matters. Must be bug somewhere.

Alan,

Take a look at:
http://localhost:8080/cocoon/news/xmlhack.xml?cocoon-view=content

It has XML like:
  <CHANNEL HREF="http://xmlhack.com/"
    BASE="http://xmlhack.com/"
    LASTMOD="2002-08-02T22:51"
    PRECACHE="YES" LEVEL="0">
  <TITLE>XMLhack</TITLE>
  ...

With all CAPS. This is transformed with stylesheets/news/xmlhack.xsl
XSLT:
  ...
  <xsl:template match="CHANNEL">
  ...

And everything works. Check result at
http://localhost:8080/cocoon/news/xmlhack.xml


Vadim


> Regards,
> 
> Joerg
> 
> Alan Hodgkinson wrote:
> > Dear All,
> >
> > WARNING: I'm a Cocoon newbie..
> >
> > I'm implementing an XSLT transformation that generates HTML
> >>from XML.
> >
> > It all works fine except that the XML that gets generated has
> > some tags with names in upper case (Yeah, it's lame. I'm
> > trying to extend somone else's code).
> >
> > When using my Cocoon pipeline and XSLT sheet, and tries to
> > match on those tags using a select with the upper case version
> > of the tag name, it never matches. However, when I try matching
> > with lower case to so the select, it works fine.
> >
> > E.g. in the generated XML I have:
> >
> >   <category>
> >     <NAME>some name</NAME>
> >     ...
> >
> > In my XSLT sheet, I have:
> >
> >  <xsl:template ..that matches on 'category'..
> >    <xsl:value-of select="NAME">
> >
> > This never matches unless I use the string "name", instead of
> > "NAME" in the select. This wouldn't bother me, except that when
> > I'm debugging the XSLT transformation on the command line, the
> > lower case doesn't match.
> >
> >>From what I remember of XML and XSLT (the xalan processor anyways),
> > size matters ;). Is there some Cocoon 'feature' or 'option' that's
> > tryng to help me out?
> >
> > Many thanks in advance,
> >
> > Alan Hodgkinson
> > Luzern, Switzerland


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>