[xml] xsl:attribute : invalid QName Error



Hello,

 

I have attached a fragment of a stylesheet which is giving me some troubles.

 

Using other xslt processors, it works flawlessly. However, with xsltproc, it generates a xsl:attribute : invalid QName at the first xsl:attribute in the attached fragment.

 

I am using libxml2-2.6.19 and libxslt-1.1.14.

 

I would appreciate any and all help.

 

Best Regards,

 

Alex

 

                        <xsl:variable name="csselement">

                                    <xsl:element name="css">

                                                <xsl:choose>

                                                            <xsl:when test="contains(string(./@style),';')">

                                                                        <xsl:for-each select="str:tokenize(string(./@style),';')">

                                                                                    <xsl:attribute name="{normalize-space(translate(substring-before(.,':'),'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz'))}">

                                                                                                <xsl:value-of select="normalize-space(substring-after(.,':'))"/>

                                                                                    </xsl:attribute>

 

                                                                        </xsl:for-each>

                                                            </xsl:when>

                                                            <xsl:when test="contains(string(./@style),’:’)">

                                                                        <xsl:attribute name="{normalize-space(translate(substring-before(string(./@style),’:’),’ABCDEFGHIJKLMNOPQRSTUVWXYZ’,’abcdefghijklmnopqrstuvwxyz’))}">

                                                                                    <xsl:value-of select="normalize-space(substring-after(string(./@style),’:’))"/>

                                                                        </xsl:attribute>

                                                            </xsl:when>

                                                            <xsl:otherwise/>

                                                </xsl:choose>

                                    </xsl:element>

                        </xsl:variable>

 

 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]