XSL Help

whats wrong with the following?

 <table name="mortgagearrears">
          <xsl:if test="../cblmlon0/arr-missed/item[@index <= 3]/@data != 0">
            <row count="1" indexID="">
              <column name="lastUpdated"/>
              <column name="avcID">{AVCID}</column>
              <column name="payments">
                <xsl:value-of select="sum(../cblmlon0/arr-missed/item[@index <= 3]/@data)"/>
              </column>
              <column name="months">12</column>
              <column name="total"/>
              <!-- JHC MOD <column name="date_issued"/> -->
              <column name="date_satisfied"/>
              <!-- JHC MOD <column name="monthly_payment"/> -->
              <column name="monthsSatisfied"/>
            </row>
          </xsl:if>
          <xsl:if test="sum(../cblmlon0/arr-missed/item[@index = 4]/@data) != 0">
            <row indexID="">
              <xsl:attribute name="count">
                <xsl:if test="../cblmlon0/arr-missed/item[@index <= 3]/@data = 0">1</xsl:if>
                <xsl:if test="../cblmlon0/arr-missed/item[@index <= 3]/@data != 0">2</xsl:if>
              </xsl:attribute>
              <column name="lastUpdated"/>
              <column name="avcID">{AVCID}</column>
              <column name="payments">
                <xsl:value-of select="format-number(../cblmlon0/arr-missed/item[@index = 4]/@data,'0')"/>
              </column>
              <column name="months">36</column>
              <column name="total"/>
              <!-- JHC MOD <column name="date_issued"/> -->
              <column name="date_satisfied"/>
              <!-- JHC MOD <column name="monthly_payment"/> -->
              <column name="monthsSatisfied"/>
            </row>
          </xsl:if>
        </table>

The error is "Unescaped '<' not allowed in attributes values" so I guess my question is how the heck do I escape this?
LVL 5
paranoidcookieAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

dualsoulCommented:
"<" this symbol is invalid in XML documents (XSLT - is xml you know), you should use &lt; entity instead of.

Here is the correct evrsino of your snippet:

      <table name="mortgagearrears">
          <xsl:if test="../cblmlon0/arr-missed/item[@index &lt; = 3]/@data != 0">
            <row count="1" indexID="">
              <column name="lastUpdated"/>
              <column name="avcID">{AVCID}</column>
              <column name="payments">
                <xsl:value-of select="sum(../cblmlon0/arr-missed/item[@index &lt;= 3]/@data)"/>
              </column>
              <column name="months">12</column>
              <column name="total"/>
              <!-- JHC MOD <column name="date_issued"/> -->
              <column name="date_satisfied"/>
              <!-- JHC MOD <column name="monthly_payment"/> -->
              <column name="monthsSatisfied"/>
            </row>
          </xsl:if>
          <xsl:if test="sum(../cblmlon0/arr-missed/item[@index = 4]/@data) != 0">
            <row indexID="">
              <xsl:attribute name="count">
                <xsl:if test="../cblmlon0/arr-missed/item[@index &lt;= 3]/@data = 0">1</xsl:if>
                <xsl:if test="../cblmlon0/arr-missed/item[@index &lt;= 3]/@data != 0">2</xsl:if>
              </xsl:attribute>
              <column name="lastUpdated"/>
              <column name="avcID">{AVCID}</column>
              <column name="payments">
                <xsl:value-of select="format-number(../cblmlon0/arr-missed/item[@index = 4]/@data,'0')"/>
              </column>
              <column name="months">36</column>
              <column name="total"/>
              <!-- JHC MOD <column name="date_issued"/> -->
              <column name="date_satisfied"/>
              <!-- JHC MOD <column name="monthly_payment"/> -->
              <column name="monthsSatisfied"/>
            </row>
          </xsl:if>
        </table>
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
paranoidcookieAuthor Commented:
OK got a bit further but now I get a whole load of errors like the following?

XPath error Invalid expression../cblmlon0/arr-missed/item[@index < = 3]/@data != 0                          
                                     ^
XPath error Invalid expression
../cblmlon0/arr-missed/item[@index < = 3]/@data != 0
                                     ^
compilation error: file xslt/ccs.xsl line 1590 element if
xsl:if : could not compile test expression '../cblmlon0/arr-missed/item[@index < = 3]/@data != 0'
XPath error Invalid expression
sum(../cblmlon0/arr-missed/item[@index < = 3]/@data)
0
ramazanyichCommented:
you now inserted additonal white space:
you are using "&lt; <" it should be "&lt;<"
0
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

paranoidcookieAuthor Commented:
Hold on a sec is the correct syntax

&lt;as suggested by dualsoul

or

&lt;< from ramazanyich?
0
ramazanyichCommented:
sorry:
it should be &lt;=
0
paranoidcookieAuthor Commented:
Thanks guys
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
XML

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.