Richard Cunliffe wrote:

Thorsten

Ok, I when I looked at the book I thought I would take it back one step,
for it to make more sense to me. Therefore I thought I would start off
doing all the XPATHs together instead of separating it out and doing
many more MATCHes.


The disadvantage in doing so is that you can not really debug the code! :(
...and frankly speaking <xsl:apply-templates select="/document/sql:rowset/sql:row/sql:generalmusictitle"/> don't result in


doing all the XPATHs together it is only one match!

...and still you have a define a "match" within the <xsl:template>!

You want to apply a template that matches select="/document/sql:rowset/sql:row/sql:artistbandname"
<xsl:apply-templates select="/document/sql:rowset/sql:row/sql:artistbandname"/>
...but no where in your code s a <xsl:template match="/document/sql:rowset/sql:row/sql:artistbandname">


...please read the eMail I have send you!


If you look on page 171 of the 'Cocoon Building applications' we can the result that the SQL transformer comes out with, we don't normally see this. Therefore I think I was calling templates that exist(although temporarily).

Can you check I'm right?

You are wrong that is the whole point in it! You are not calling a template(<xsl:call-template>)! You want to apply a template (<xsl:apply-templates>)!
...but that is xsl stuff


...what comes out of a sql transformer is xml stuff! Node that you can match later on!


I have got the results to come out correctly by just copying the book,


NO!

Ok, last time! Try:
   <map:pipeline>
       <map:match pattern="database.2test">
           <map:generate src="database.xml"/>
           <map:transform type="sql">
               <map:parameter name="use-connection" value="soundpool"/>
           </map:transform>
           <map:serialize type="xml"/>
       </map:match>
   </map:pipeline>

call it!
post the result! Otherwise neither you nor me know what is the real result of the transform! Or maybe there is NO result!


...by the way : your sitemap
           <map:transform type="sql">
               <map:parameter name="use-connection" value="soundpool"/>
           </map:transform>
and your xsl file:
<sql:use-connection>soundpool</sql:use-connection>

You should NOT DO that! One time is enough!

but as soon as I start adding things to the style sheet, things start to
go wrong, that's why I thought I would set it up myself from start to
gain a better understanding.


If I am calling the correct templates, can you see why it displays my
XML document 3 times?

If I'm wrong :-( about the templates on page 171, then tell me, and I
will try and work from there example a bit more.



That is just AN example NOT what is coming out for you!

Thanks

Richard

By the way I have included my sitemap!




------------------------------------------------------------------------

---------------------------------------------------------------------
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]



Reply via email to