CIncludeT-SQLT- XSLT

2002-06-07 Thread David LAGARDERE

Hello.

I got more details about what I thought being
an error with Xalan and XPath.
What I'm doing is getting data from a main XML file
including other XML files containg SQL requests with
the cinclude::include. These requests are processed in
another pipeline and SQL data is retrieved thanks to
the SQL Transformer and xml serialized. I finally get
the resulting data from the SQL pipeline in the
first pipeline (thanks to the CInclude transformer)
which is passed to an XSLT transformer and html
serialized.

My problem is that the resulting XML is not processed
by XSLT as expected :

== Main XML page ==

?xml version=1.0 encoding=UTF-8?
search
xmlns:ci=http://apache.org/cocoon/include/1.0;
ci:include src=cocoon:/sql/table.xml/
/search   

== Resulting XML ==

search
 table
  rowset
  !-- Some data fetched by the SQL transformer --
  /rowset
 /table
/search

== XSL applied ==

xsl:template match=search
 !-- Some HTML --
 xsl:apply-templates select=table/rowset
 !-- Some HTML --
/xsl:template

xsl:template match=table/rowset
 !-- Some HTML --
/xsl:template

The (bad) result I get is that the table/rowset
template is never reached !

Here is the sitemap :

map:pipelines
 map:pipeline 
  map:match pattern=sql/**.xml
   map:generate src=xml/sql/{1}.xml/
   map:transform type=sql
map:parameter name=use-connection
value=personnel/
map:parameter name=show-nr-of-rows
value=false/ 
   /map:transform
   map:serialize type=xml/
  /map:match
 /map:pipeline
 map:pipeline
  map:match pattern=**.xml
   map:generate src=xml/{1}.xml/
   map:transform type=cinclude/
   map:transform src=xsl/{1}.xsl type=xslt/
   map:serialize type=xml/
  /map:match
 /map:pipeline
/map:pipelines

NB:the same happens if I use one pipeline
and three matchers

I really some help to get around this...

Thanks in advance

David LAGARDERE

___
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com

-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: CIncludeT-SQLT- XSLT

2002-06-07 Thread Luca Morandini

David,

may you try prefixing the elements produced by SQLTransformer with the
sql: namespace in your XSL (like in: xsl:template
match=table/sql:rowset) ?

Best regards,


-
   Luca Morandini
   GIS Consultant
  [EMAIL PROTECTED]
http://utenti.tripod.it/lmorandini/index.html
-


 -Original Message-
 From: David LAGARDERE [mailto:[EMAIL PROTECTED]]
 Sent: Friday, June 07, 2002 12:15 PM
 To: [EMAIL PROTECTED]
 Subject: CIncludeT-SQLT- XSLT


 Hello.

 I got more details about what I thought being
 an error with Xalan and XPath.
 What I'm doing is getting data from a main XML file
 including other XML files containg SQL requests with
 the cinclude::include. These requests are processed in
 another pipeline and SQL data is retrieved thanks to
 the SQL Transformer and xml serialized. I finally get
 the resulting data from the SQL pipeline in the
 first pipeline (thanks to the CInclude transformer)
 which is passed to an XSLT transformer and html
 serialized.

 My problem is that the resulting XML is not processed
 by XSLT as expected :

 == Main XML page ==

 ?xml version=1.0 encoding=UTF-8?
 search
 xmlns:ci=http://apache.org/cocoon/include/1.0;
   ci:include src=cocoon:/sql/table.xml/
 /search

 == Resulting XML ==

 search
  table
   rowset
   !-- Some data fetched by the SQL transformer --
   /rowset
  /table
 /search

 == XSL applied ==

 xsl:template match=search
  !-- Some HTML --
  xsl:apply-templates select=table/rowset
  !-- Some HTML --
 /xsl:template

 xsl:template match=table/rowset
  !-- Some HTML --
 /xsl:template

 The (bad) result I get is that the table/rowset
 template is never reached !

 Here is the sitemap :

 map:pipelines
  map:pipeline
   map:match pattern=sql/**.xml
map:generate src=xml/sql/{1}.xml/
map:transform type=sql
 map:parameter name=use-connection
 value=personnel/
 map:parameter name=show-nr-of-rows
 value=false/
/map:transform
map:serialize type=xml/
   /map:match
  /map:pipeline
  map:pipeline
   map:match pattern=**.xml
map:generate src=xml/{1}.xml/
map:transform type=cinclude/
map:transform src=xsl/{1}.xsl type=xslt/
map:serialize type=xml/
   /map:match
  /map:pipeline
 /map:pipelines

 NB:the same happens if I use one pipeline
 and three matchers

 I really some help to get around this...

 Thanks in advance

 David LAGARDERE

 ___
 Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
 Yahoo! Mail : http://fr.mail.yahoo.com

 -
 Please check that your question has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faqs.html

 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: CIncludeT-SQLT- XSLT

2002-06-07 Thread David LAGARDERE

 --- Luca Morandini [EMAIL PROTECTED] a écrit :
 David,
 
 may you try prefixing the elements produced by
 SQLTransformer with the
 sql: namespace in your XSL (like in: xsl:template
 match=table/sql:rowset) ?
 
 Best regards,
 
 

Many thanks, Luca.
It was the problem ! But I really don't
understand why the sql namespace declaration and
the namespace prefix don't appear in the resulting
XML code (I mean, if I take a snapshot before the 
XSLT transformation). Does Cocoon hide it ?


___
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com

-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: CIncludeT-SQLT- XSLT

2002-06-07 Thread Luca Morandini


 -Original Message-
 From: David LAGARDERE [mailto:[EMAIL PROTECTED]]
 Sent: Friday, June 07, 2002 12:41 PM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: RE: CIncludeT-SQLT- XSLT


  --- Luca Morandini [EMAIL PROTECTED] a écrit :
  David,
 
  may you try prefixing the elements produced by
  SQLTransformer with the
  sql: namespace in your XSL (like in: xsl:template
  match=table/sql:rowset) ?
 
  Best regards,
 
 

 Many thanks, Luca.
 It was the problem ! But I really don't
 understand why the sql namespace declaration and
 the namespace prefix don't appear in the resulting
 XML code (I mean, if I take a snapshot before the
 XSLT transformation). Does Cocoon hide it ?

well, I wondered the same and didn't find an explanation for it... could you
spare some time to investigate the matter ?

I apologize for not being of much assistance... right now I'm horribly
busy... this will be the second working-weekend in a row :(

Best regards,

-
   Luca Morandini
   GIS Consultant
  [EMAIL PROTECTED]
http://utenti.tripod.it/lmorandini/index.html
-



 ___
 Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
 Yahoo! Mail : http://fr.mail.yahoo.com


-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]