xsl-list
[Top] [All Lists]

RE: [xsl] RE: Reply to Wolfgang Laun and "G. Ken Holman" re Question on search and replace in XSL (ID's : <CANaj1LdOU1Wszk90PbR_5qSqsrVqrR5bc83cyWfKYmBt_VcB=A(_at_)mail(_dot_)gmail(_dot_)com> &<7(_dot_)0(_dot_)1(_dot_)0(_dot_)2(_dot_)20120404172322(_dot_)023fbf88(_at_)wheresmymailserver(_dot_)com>)

2012-04-06 11:39:58
I'm pretty sure that that's why it's complaining, because as written I don't 
think it's valid XSL.   If you look at all the other xsl:when statements, they 
all include one <td> and one </td>.   The one that it's choking on has an extra 
</td>.

<xsl:when test="contains($text,$find)">
     <td>     <= here's where it opens
          <xsl:value-of select="substring-before($t= ext,$find)"/>
     </td>      <= here's where it closes once
     <xsl:call-template name="APNameSplit">
          <xsl:with-param name="text" select="sub= string-after($text,$find)"/>
          </td>     <= and here's where it closes again
          <xsl:with-param name="find" select="$find"/>
     </xsl:call-template>
</xsl:when>

If one of those </td>s is really redundant, delete it.  If it's not redundant, 
then add the matching <td> someplace above it.  (If the matching <td> is 
supposed to come from the APNameSplit, I don't think you can do that.  The 
style sheet has to be valid XML in and of itself, which it can't be when the 
open and close tags don't match up.

Michele

-----Original Message-----
From: Wolfgang Laun [mailto:wolfgang(_dot_)laun(_at_)gmail(_dot_)com] 
Sent: Friday, April 06, 2012 12:18 PM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] RE: Reply to Wolfgang Laun and "G. Ken Holman" re Question 
on search and replace in XSL (ID's : 
<CANaj1LdOU1Wszk90PbR_5qSqsrVqrR5bc83cyWfKYmBt_VcB=A(_at_)mail(_dot_)gmail(_dot_)com>
 
&<7(_dot_)0(_dot_)1(_dot_)0(_dot_)2(_dot_)20120404172322(_dot_)023fbf88(_at_)wheresmymailserver(_dot_)com>)

No, the </td> line "where ... complaining" is simply redundant.

<td>...</td> are correctly bracketing <xsl:value-of.../> where content is being 
generated.

The resulting table with rows of varying length will not very nice unless all 
borders are omitted.

-W

On 6 April 2012 18:02, Michele R Combs <mrrothen(_at_)syr(_dot_)edu> wrote:

You're missing the opening <td> tag:

<xsl:call-template name="APNameSplit">
       <td>   <= need to add the open td here, as in all the other 
call-template statements
       xsl:with-param name="text" 
select="substring-after($text,$find)"/>
       </td>
                    this line is where intellisense is complaining
       <xsl:with-param name="find" select="$find"/>
       </xsl:call-template>

Michele

-----Original Message-----
From: Peterson, Melanie S. [mailto:MPeterson(_at_)KRAMERLEVIN(_dot_)com]
Sent: Friday, April 06, 2012 11:18 AM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] Reply to Wolfgang Laun and "G. Ken Holman" re Question 
on search and replace in XSL (ID's :
<CANaj1LdOU1Wszk90PbR_5qSqsrVqrR5bc83cyWfKYmBt_VcB=A(_at_)mail(_dot_)gmail(_dot_)com>
&<7(_dot_)0(_dot_)1(_dot_)0(_dot_)2(_dot_)20120404172322(_dot_)023fbf88(_at_)wheresmymailserver(_dot_)com>)

Ken, I'm using version 1.0, but there's no reason I couldn't switch to 
2.0 if that gets me somewhere. I don't really understand your comment 
about the code already creating two columns.  The output is the two 
fields, one on top of the other.

Wolfgang,  Sorry - I should've specified - the fields can have 
multiple semi-colons between them, so the recursive code needs to 
stay.  But when I try to insert <td> and </td> in the recursive code, 
it doesn't work.  The error message is: The 'xsl:call-template' start 
tag on line 161 position 8 does not match the end tag of 'td'. Line 
163, position 11.  I don't know how to get around this.   Here's what I've 
tried:

<xsl:template name="APNameSplit">
 <xsl:param name="text" select="string('')"/>
 <xsl:param name="find" select="string(';')"/>
 <xsl:choose>
   <xsl:when test="$find = ''">
     <td>
       <xsl:value-of select="$text"/>
     </td>
   </xsl:when>
   <xsl:when test="contains($text,$find)">
     <td>
     <xsl:value-of select="substring-before($text,$find)"/>
     </td>
     <xsl:call-template name="APNameSplit">
       <xsl:with-param name="text" 
select="substring-after($text,$find)"/>
       </td>
                    this line is where intellisense is complaining
       <xsl:with-param name="find" select="$find"/>
     </xsl:call-template>
   </xsl:when>
   <xsl:otherwise>
     <td>
       <xsl:value-of select="$text"/>
     </td>
   </xsl:otherwise>
 </xsl:choose>
</xsl:template>

<xsl:template match="APName">
 <xsl:call-template name="APNameSplit">
   <xsl:with-param name="text" select="."/>
   <xsl:with-param name="find" select="string(';')"/>
 </xsl:call-template>
</xsl:template>

All your help is much appreciated!

Melanie Peterson
Project Coordinator/Systems Developer
Kramer Levin Naftalis & Frankel LLP
1177 Ave. of the Americas
New York, NY 10036
212-715-7738



Melanie S. Peterson

Project Coordinator/Systems Developer
Kramer Levin Naftalis & Frankel LLP
1177 Avenue of the Americas
New York, New York 10036
Tel: 212-715-7738
Fax: 212-715-8000
Email: MPeterson(_at_)KRAMERLEVIN(_dot_)com
<http://www.kramerlevin.com/>


This communication (including any attachments) is intended solely for 
the
recipient(s) named above and may contain information that is 
confidential, privileged or legally protected. Any unauthorized use or 
dissemination of this communication is strictly prohibited. If you 
have received this communication in error, please immediately notify 
the sender by return e-mail message and delete all copies of the 
original communication. Thank you for your cooperation.

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


<Prev in Thread] Current Thread [Next in Thread>