Re: [xsl] Dynamic creation of Frame view from XML using XSLT Regex match!

Subject: Re: [xsl] Dynamic creation of Frame view from XML using XSLT Regex match!
From: sreejith m <msreejith@xxxxxxxxx>
Date: Sun, 9 Sep 2007 21:16:59 -0700 (PDT)
Sorry Abel for missing that point of yours.

Currently, I have (already posted in previous
threads):
a) source XML doc
b) XSL doc
The above two render a html page with the XML content
rendered into a html tabular format using the XSLT.

What I want is :
a) the XSL should be able to generate a single html
output with a frameset

b) whatever I *Currently* get should go to right frame

c) the XSL should also generate left frame which acts
as an index page to the right frame. The hyperlinks in
lframe are the <h1> words (table headings) from the
rframe, which point to the corresponding table in the
right frame itself.

Hope this adds a little clarity?

Thanks for your inputs..

regards
Sreejith

--- Abel Braaksma <abel.online@xxxxxxxxx> wrote:

> sreejith m wrote:
> >
> > lframe should dynamically get populated with:
> > --------------------------------------------
> > <html>
> > <body>
> > <a href='rframe.T_SYS_REF'> T_SYS </a>
> > <a href='rframe.T_MB_REF'> T_MB </a>
> > </body>
> > </html>
> >
> > rframe should dynamically contain:
> > ----------------------------------
> > <html>
> > <body>
> >    <h1> T_SYS </h1>
> >    <a name='T_SYS_REF'> <table id='t_sys_tab'>
> </a>
> >        --content for t_sys_tab
> >    </table>
> >
> >    <h1> T_MB </h1>
> >    <a name='T_MB_REF'> <table id='t_mb_tab'> </a>
> >        --content for t_mb_tab
> >    </table>
> >
> > </body>
> > </html>
> >
> >   
> 
> 
> I think you missed my point. I was requesting about
> what you *currently* 
> have as output, and what you want it to be. Your
> input XML was not 
> well-formed XML, so I guess you did not use it for
> testing. Above is not 
> what you are currently having, nor is it an exact
> sample of what you 
> want. We cannot distill from that what possible
> elements you have in 
> mind for your output.
> 
> Are you aware of that you are using an XSLT 1.0
> stylesheet that creates 
> XHTML and that this has some drawbacks that will
> need to be addressed 
> for the page to render correctly? Notably the empty
> / non-empty tag 
> problem, i.e., a tag like <p> when it does not
> contain content is 
> rendered as <p /> by the processor, but some
> browsers cannot handle that 
> well and expect it to be <p></p> (same with
> <td></td>, <li></li> etc). 
> The other way around for <br />, which is already an
> empty element and 
> should remain empty. Note the space before the
> slash, which is not 
> mandatory in XML, but is mandatory in XHTML for
> backward compatibility 
> with misrendering user agents.
> 
> Anyway, below is your current output. Please update
> again and tell us 
> how you want it to be (i.e., what are you missing,
> what do you expect). 
> In addition, you supplied one stylesheet, but you
> have three outputs: 
> the frameset, the left frame and the right frame.
> So, you'll need three 
> stylesheets (or three modes). I guess that the one
> you are asking about 
> is about the right frame stylesheet only?
> 
> Your current output, based on adjusted XML:
> 
> <!DOCTYPE html
>   PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
> <html xmlns="http://www.w3.org/1999/xhtml";>
>    <head>
>       <title>XMLDOC</title>
>       <style type="text/css">
>                     table { font-family: Arial,
> sans-serif; }
>                     th { font-size: 75%; background:
> #4D5D97;
>                     color: #FFFFFF; }
>                     td { vertical-align: top; }
>                     .odd { background: #E3E4FA; }
>                     .evn { background: #E7ECF0; }
>                 </style>
>    </head>
>    <body>
>       <h1>T_SYS</h1>
>       <table border="0">
>          <tr>
>             <th>acol</th>
>             <th>bcol</th>
>             <th>acol</th>
>             <th>bcol</th>
>          </tr>
>          <tr class="odd">
>             <td> aval </td>
>             <td> bval </td>
>             <td> aval </td>
>             <td> bval </td>
>          </tr>
>       </table>
>       <h1>T_MB</h1>
>       <table border="0">
>          <tr>
>             <th>acol</th>
>             <th>bcol</th>
>          </tr>
>          <tr class="odd">
>             <td> aval </td>
>             <td> bval </td>
>          </tr>
>          <tr class="evn">
>             <td> aval </td>
>             <td> bval </td>
>          </tr>
>       </table>
>    </body>
> </html>
> 
> 
> Cheers,
> -- Abel Braaksma
> 
> 



       
____________________________________________________________________________________
Yahoo! oneSearch: Finally, mobile search 
that gives answers, not web links. 
http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC

Current Thread