Loading...

xsl-list@lists.mulberrytech.com

[Prev] Thread [Next]  |  [Prev] Date [Next]

Re: [xsl] Reply to Wolfgang Laun and "G. Ken Holman" re Question on search and replace in XSL G. Ken Holman Fri Apr 06 11:00:38 2012

At 2012-04-06 15:18 +0000, Peterson, Melanie S. wrote:
Ken, I'm using version 1.0, but there's no reason I couldn't switch to 2.0 if that gets me somewhere.

It will help you a lot ... but you still haven't given a code example of your desired output for a specific input. When I see that I can give you clean XSLT 2.0 code that produces multiple columns.

I don't really understand your comment about the code already creating two columns.

This is what I see .... two columns in the table:

At 2012-04-04 21:17 +0000, Peterson, Melanie S. wrote:
Here's my current code:

....
<tr>
<td valign="top" width="180">Adverse Party:</td>
<td valign="top" style="font-weight:normal">
              <xsl:apply-templates select="APName" />
</td>
</tr>
....

So, I asked, for a field with one semi-colon, do you want three columns in the table or do you want a nested table of two columns in the right column of the outer table?

Your specification is lacking detail which is making everyone guess what you want ... which takes a lot of time from volunteers. If you gave us a sample of input and a sample of the corresponding output, it would be a lot clearer.

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.

So you are saying that the number of fields is not limited to two, but can be any number. Does this mean that if there are two semi-colons you want three columns for that value, plus the column for the title as above?

Please tell me for this example:

  <APName>abc;def</APName>

... do you want the row to have three columns:

<tr>
<td valign="top" width="180">Adverse Party:</td>
<td valign="top" style="font-weight:normal">
<td>abc</td>
<td>def</td>
</td>
</tr>

... or a nested table with two columns:

<tr>
<td valign="top" width="180">Adverse Party:</td>
<td valign="top" style="font-weight:normal">
 <table>
  <tr>
   <td>abc</td>
   <td>def</td>
  </tr>
 </table>
</td>
</tr>

... or something else entirely?

And what, exactly, do you want the output to be for the following?

  <APName>abc;def;ghi;jkl;mno</APName>

Rather than using prose, please give precise inputs and outputs in markup and use prose only where you think there might be ambiguous interpretation of what we see.

I hope this helps.

. . . . . .  .. Ken

--
Public XSLT, XSL-FO, UBL and code list classes in Europe -- May 2012
Contact us for world-wide XML consulting and instructor-led training
Free 5-hour lecture: http://www.CraneSoftwrights.com/links/udemy.htm
Crane Softwrights Ltd.            http://www.CraneSoftwrights.com/s/
G. Ken Holman                   mailto:[EMAIL PROTECTED]
Google+ profile: https://plus.google.com/116832879756988317389/about
Legal business disclaimers:    http://www.CraneSoftwrights.com/legal


--~------------------------------------------------------------------
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:[EMAIL PROTECTED]>
--~--