[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

xsl:attribute vs "expected comment or PI"?

Subject: xsl:attribute vs "expected comment or PI"?
From: Eric Scheid <eric.scheid@xxxxxxxxxxxxxxx>
Date: Mon, 23 Jan 2006 02:24:01 +1100
expected comment or processing instruction
I'm baffled. Why is this not working? The error I'm getting is "expected
comment or processing instruction". The problem is somewhere within the
second xsl:attribute ... if I take it out, no error. I've tried switching
the two xsl:attributes around, I've tried jamming it all onto one line, I've
tried taking the other xsl:attribute out ... no luck.

<xsl:template match="fmp:FMPXMLRESULT">
<ul>
<xsl:for-each select="fmp:RESULTSET/fmp:ROW">
 <li>
  <a>
   <xsl:attribute name="href">authors-<xsl:value-of
select="fmp:COL[1]/fmp:DATA[1]"/>.html</xsl:attribute>
   <xsl:attribute name="title">
    <xsl:value-of select="fmp:COL[2]/fmp:DATA[1]"/> author
    <xsl:if test="fmp:COL[2]/fmp:DATA[1]!='1'">s</xsl:if>,
    <xsl:value-of select="fmp:COL[3]/fmp:DATA[1]"/> article
    <xsl:if test="fmp:COL[3]/fmp:DATA[1]!='1'">s</xsl:if>
   </xsl:attribute>
   <xsl:value-of select="fmp:COL[2]/fmp:DATA[1]"/></a></li>
</xsl:for-each>
</ul>
</xsl:template>

The input data looks like this:

<FMPXMLRESULT xmlns="http://www.filemaker.com/fmpxmlresult">
<RESULTSET FOUND="345">
<ROW MODID="6" RECORDID="24">
    <COL><DATA>A</DATA></COL>
    <COL><DATA>18</DATA></COL>
    <COL><DATA>15</DATA></COL>
</ROW>
<ROW MODID="6" RECORDID="25">
    <COL><DATA>B</DATA></COL>
    <COL><DATA>18</DATA></COL>
    <COL><DATA>15</DATA></COL>
</ROW>
</RESULTSET>
</FMPXMLRESULT>

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.