On Tue, 22 Jan 2002, Donald Ball wrote:
> On Tue, 22 Jan 2002 [EMAIL PROTECTED] wrote:
>
> > >0. <xsl:for-each select="survey:label[lang('en')]">
> > >fails to match anything.
> > >...
> > >1. <xsl:value-of select="@xml:lang"/> returns an empty string...
> > >2. local-name(@xml:lang) returns 'xml:lang'.
> >
> > These are probably all related to a transient bug we had with
> > the xml namespace prefix. All the above work fine in the
> > final-release version of XalanJ2.
>
> i just upgraded to xalan-2.2 final and xerces-1.4.4 and i'm still having
> the same problem. if it's not a bug related to the xml namespace prefix,
> i'm guessing the problem is probably in how i'm creating the xml:lang
> attribute in SAX2 - could you perhaps post a code snippet for properly
> creating an xml:lang attribute in SAX2 so i can see which it is?
fwiw, i was able to make it work by explicitly declaring the xml
namespace, using this SAX2 event:
attributes.addAttribute("http://www.w3.org/XML/1998/namespace",
name.substring(4), name, "CDATA", String.valueOf(map.get(name)));
where name.equals("xml:lang")
i would love to hear of a way to do it that does not require me to declare
the xml namespace tho, since apparantly i'm not supposed to have to.
thanks in advance.
- donald