Re: [xsl] Create Table

Subject: Re: [xsl] Create Table
From: bernie bonn <moochambo@xxxxxxxxx>
Date: Mon, 12 Apr 2010 06:59:03 -0700 (PDT)
I was just going to ask if that was possible.  I believe sorting the nodes we
are after would help. Then I would just have to make sure the nodes with
@section=changes are seperated as main table row entries and the changeset
seperated into its own column.  Can you place a sort command around a selected
node-set, before you start 'really' processing it?    

Thanks Eric!
BB
----- Original Message ----
From: Eric J. Bowman <eric@xxxxxxxxxxxxxxxx>
To:
bernie bonn <moochambo@xxxxxxxxx>
Cc: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Sent:
Sat, April 10, 2010 9:23:43 AM
Subject: Re: [xsl] Create Table

I'm not
wrapping my head around the problem.  Would sorting the file by
lineId first,
and then operating on that sorted nodeset, fix the issue?

-Eric

bernie bonn
wrote:
>
> aaah , I'm killing you here.   I just realized a muddy point. I was
> operating before on the premise that each may or may not have a
>
@Field='File'.  I have recently realized that each change does have
> this it
may just be in some (what looks to be) random place.  This is
> why I was
thinking we would have to track the lineId.  I'll show an
> example.  You see
@lineId=1 is below then the 'change' jumps up to
> @lineId =3, but they go
together and then follow the sequence.  The
> files seems to do this a couple
of times.  You may notice , if you
> have the source, that the <data> nodes we
are selecting start with
> <data lineId="61" section="diff"
field="diff">266c267,273</data>
> which is a continuation of the 'diffs' from
further down in the
> file.  Yuck!
> 
> 
> <data lineId="3" section="changes"
field="date">20100310.102809</data>
> <data lineId="4" section="changes"
field="user">jryan</data>
> <data lineId="5" section="changes"
field="cr_number">602018</data>
> <data lineId="6" section="changes"
field="comment">fix for log
> 5960</data> <data lineId="7" section="diff"
field="diff">18a19</data>
> <data lineId="8" section="diff" field="diff">&gt;
import
> com.paychex.spr.clientproduct.ClientProduct;</data> <data lineId="9"
> section="diff" field="diff">19a21,22</data> <data lineId="10"
>
section="diff" field="diff">&gt; import
>
com.paychex.spr.clientproduct.config.ProductFinderUtility;</data>
> <data
lineId="11" section="diff" field="diff">&gt; import
>
com.paychex.spr.clientproduct.ejb.ClientProductAssembler;</data>
> <data
lineId="12" section="diff" field="diff">720c723</data> <data
> lineId="13"
section="diff" field="diff">&lt;  private void setMethod
> (String code,
String calc401k, ClientPayComp clientPayComponent)
> </data> <data lineId="14"
section="diff" field="diff">---</data>
> <data lineId="15" section="diff"
field="diff">&gt;  private void
> setMethod(String code, String calc401k,
ClientPayComp
> clientPayComponent, boolean setMemoInd)</data> <data
lineId="16"
> section="diff" field="diff">731a735,736</data> <data lineId="17"
> section="diff" field="diff">&gt;    if (setMemoInd)</data> <data
>
lineId="18" section="diff" field="diff">&gt;
>
    method.setIncludeMemoHours(true);</data> <data lineId="19"
>
section="diff" field="diff">967a973</data> <data lineId="20"
> section="diff"
field="diff">&gt;     boolean setMemoInd =
> false;</data> <data lineId="21"
section="diff"
> field="diff">972c978,984</data> <data lineId="1"
section="changes"
>
field="file">.\payx\domain\dev\src\com\paychex\spr\domain\conversion
>
\task\ConvertClientPayComponents.java</data> <data lineId="2"
>
section="changes" field="version">\main\spr2010_apr_dev\1</data>
> 
> 
> The
output of what you gave me is close, but the changes that are
> broken out
across nodes aren't complete.  Just wanted to clarify.  I
> will try to adapt
the code to somehow keep track of the lineID, but
> if you are a glutton for
punishment I sure do appreciate any further
> guidance.  
> 
> Your table
suggestion makes perfect sense and I will follow your
> advice.
> 
> Thanks
again for the help
> 
> 
> 
> ----- Original Message ----
> From: Eric J.
Bowman <eric@xxxxxxxxxxxxxxxx>
> To: bernie bonn <moochambo@xxxxxxxxx>
> Cc:
xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Sent: Thu, April 8, 2010 7:25:23 PM
>
Subject: Re: [xsl] Create Table
> 
> bernie bonn wrote:
> > 
> > I know, my
first stab at XSLT and this is the file I get.  Thanks so
> > much for
spending some time helping me out.  I will try to digets
> > this solution
today.  I did notice that yu reformatted the XML file
> > so that the nodes
are in order of @lineId, which is not the case in
> > the source, is tis
accounted for in some way that I have missed.
> > 
> 
> I believe the order of
lineIds is sufficiently muddled in my example.
> 
> >
> > Also, as far as the
column, since the table is quite wide already I
> > thought adding a row (with
one wide cell) beneath the heading would
> > work, with a "Details" button or
something to hide / unhide.  This
> > is how the users are used to seeing it
now.  I could send you a
> > screenshot if you'd like.    Anyway, thats for
another day.  I am
> > going to dive into your solution.
> > 
> 
> Don't break
the semantics of your output by making this a row; that
> doesn't correlate
with the headings or anything else.  Imagine if
> someone wants to use your
output as an XSLT input file someday, and
> don't inflict this upon them!
> 
>
Stick with a machine-readable table.  If that doesn't appear the way
> you
want it to appear on-screen, well, that's what CSS is for.  Leave
> some space
between rows, then use position:absolute on the last <td>
> to move it into
that space, and stretch it to the entire width.
> 
> -Eric
> 
> 
> 
>     

Current Thread