Hello
again,
do you
know the book "Cocoon: Building XML Applications" form Carsten Ziegeler &
Matthew Langham [ISBN of the book (0735712352)]?
Here
is an example as attachment (hope that is allright with you,
Carsten&Matthew) about SQL.
King
regards
Thorsten
I
had a glance at your code, do you use the SPY as well to show the
result?
I
guess not! I am using the SPY as well.
Ok,
correct me if I am wrong! I aspect your pipeline looks like that (because I
guess you are using cocoon to transform):
<map:pipeline> <map:match
pattern="database"> <map:generate
src=""/> <map:transform type="sql"/>
<map:transform src=""/>
<map:serialize/> </map:match> </map:pipeline>
Is
that right? If not -> it should look like that!
Explanation:
<map:pipeline> <map:match
pattern="database"> 1) <map:generate
src=""/>
2) <map:transform type="sql"/> 3)
<map:transform src=""/>
<map:serialize/> </map:match> </map:pipeline>
1) take the
database.xml
2) excecute the SQL Statement <- that will
produce XML
3) your transformation. BASED on everything
before!
Try the following:
<map:pipeline> <map:match
pattern="database"> <map:generate
src=""/>
<map:transform type="sql"/> <!--
<map:transform src=""/>-->
<map:serialize/> </map:match> </map:pipeline>
then you see what you have to transform! See
the source code (browser right click) and copy it to the Spy. from there you
can copy the XPath.
...and then you *just* have to go
on!
Hope that helps!
Thorsten
Thorsten,
Ok the following
statement is trying to display the results of the query from the MySQL
database in a table, I don’t know if this is right.
What
are you trying to do with, anyway:
<xsl:for-each
select="query"> <xsl:for-each
select="execute-query"> <xsl:apply-templates/> </xsl:for-each> </xsl:for-each>
The code looks
complicated, because I am using XML Spy designer which allows you to put
together your style sheet visually, with the aid of the DTD. The code above
was the XML Spy’s way of trying to represent it from the
DTD.
I have attached my
xml, xsl, and dtd for you to have a look at to get a better
understanding.
Many
thanks,
Richard.
|
example.zip
Description: example.zip
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]