That was a problem in IE6 - wouldn't display XML,
was asking permission to use some ActiveX control
and doing nothing regardles you agreed or not.
As soon as I tried it in Firefox, got XML.
Now need XSLT page to work.
It seems that correct form to pick up a rowset in XSL is:
<xsl:variable name='custdata'
select="/page/content/sql:[EMAIL PROTECTED]:name='query1']"/>
The query returns 1 row.
But for whatever reason I can't get to the row, to show the
values on the screen:
<xsl:for-each select='$custdata'> <-- expect to pass
$custdata/row
<xsl:call-template name='row1'>
<xsl:with-param name='therow' select='.'/>x
</xsl:call-template>
</xsl:for-each>
<xsl:template name="row1">
<xsl:param name='therow'/>
<td>data=<xsl:value-of select='$therow'/></td> <--- can see
the whole row
<td align="left" valign="middle"><xsl:value-of
select='$therow/col1'/></td> <--- can't see
</tr>
</xsl:template>
What am I doing wrong ?
(probably some stupid XSL bug :-( )
Thank you,
Oleg.
--- Askild Aaberg Olsen <[EMAIL PROTECTED]> wrote:
> Better keep the discussion on list...
>
> Use the xml-serializer instead of html, like
> <map:serialize type="xml"/>.
>
> You can just paste that right after the sql-transformer in the
> pipeline,
> since it will stop execution at that point (no need to remove
> xsl-transformer and html-serializer)
>
> Another option is to use the log-transformer, like
> <map:transform type="log"/>
>
> Askild
> -
>
> Oleg Konovalov wrote:
>
> >Askild,
> >
> >And how can I see that output (in XML form)?
> >
> >If I just remove XSLT transformer (have HTML serializer),
> >I get resulting data (no XML).
> >I tried to download and apply simple-sql2html.xsl
> >stylesheet from here:
>
>http://fisheye.cenqua.com/changelog/xml?cs=MAIN:giacomo:20010509204926
> >but it's not complete [xsl not defined, etc.], but when I
> >resolved that, getting the same data as without it, no XML.
> >
> >So how can I get XML output from SQL transformer ?
> >
> >TIA,
> >Oleg.
> >
> >
> >--- Askild Aaberg Olsen <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> >>Oleg Konovalov wrote:
> >>
> >>
> >>
> >>>Ard,
> >>>
> >>>I've read a lot of Cocoon documentation on the net and
> books,
> >>>
> >>>
> >>>especially regarding SQL Transformer.
> >>>It does mention that queries might be named.
> >>>So if I have several SQL queries in SQLTransformer (e.g.
> >>>
> >>>
> >>query1,
> >>
> >>
> >>>query2), what is a convention for the output ?
> >>>
> >>><page xmlns:sql="http://apache.org/cocoon/SQL/2.0">
> >>><content>
> >>> <sql:execute-query>
> >>> <sql:query name="query1">
> >>> SELECT *
> >>> FROM custtable
> >>> WHERE cust_id=<sql:substitute-value sql:name="cust_id"/>
> >>></sql:query>
> >>></sql:execute-query>
> >>>...
> >>></content>
> >>></page>
> >>>
> >>>I need to pickup this SQLTransformer output (few rowsets)
> as
> >>>
> >>>
> >>an
> >>
> >>
> >>>input into XSLT->HTML transformer/serializer,
> >>>something like:
> >>>
> >>><xsl:variable name='rowset1'
> >>>select='/page/content/paging/data/query1'/> ?
> >>>
> >>>
> >>>
> >>>
> >>It adds an attribute named "name" to the rowset, like:
> >>
> >><xsl:value-of
> >>
> >>
> >>
>
>select="/sqlpart/sql:[EMAIL PROTECTED]'query1']/sql:row/sql:thisfield"/>
> >
> >
> >>I'm not 100% sure this is the right output (just looked in
> >>SQLTransformer.java) , but why don't you just look at the
> >>pipeline output?
> >>
> >>Askild
> >>-
> >>
> >>
> >>
> >>
>
>---------------------------------------------------------------------
> >
> >
> >>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>For additional commands, e-mail:
> [EMAIL PROTECTED]
> >>
> >>
> >>
> >>
> >
> >
> >
> >
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]