You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Jessica Niewint <j....@kiosco.org> on 2002/09/27 17:02:59 UTC
Output xsl --- next trap
HI it's me again.
With this xml file I get the right chapters for the right sections and the
right sections for the right document.
Only that my output is something like this
document
section A section B
chapter 1 chapter 2
chapter 3
I wanted to generate a document structure like this:
document
section A
chapter 1
chapter 2
section B
chapter 3
I have no idea if my way how to use the esql -query is wrong or if I have
change the xsl file.
But may some one just give me a hint ...
Thank you in advance ...
J.
I will post again my xml and my xsl file. Sorry for this long posting.
myfile.xml
<?xml version="1.0" encoding="UTF-8"?>
<xsp:page laguage="java" xmlns:xsp="http://apache.org/xsp"
xmlns:esql="http://apache.org/cocoon/SQL/v2">
<!-- Get Document -->
<Document xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="schema.xsd"
xmlns:esql="http://apache.org/cocoon/SQL/v2" xmlns:xsp="http://apache.org/xsp">
<esql:connection>
<esql:pool>xmldb</esql:pool>
<xsp:logic> String document= "1";</xsp:logic>
<esql:execute-query>
<esql:query>select * from document where
DocID=<xsp:expr>document</xsp:expr>
</esql:query>
<esql:results>
<esql:row-results>
<DocObj>
<esql:get-string
column="DocObject"/>
</DocObj>
<DocTitle>
<esql:get-string
column="DocTitle"/>
</DocTitle>
<DocVer>
<esql:get-string
column="DocVersion"/>
</DocVer>
<!-- Get Sections-->
<Section>
<esql:execute-query>
<esql:query>select
* from section where SecID=<xsp:expr>section</xsp:expr></esql:query>
<esql:results>
<esql:row-results>
<SecTitle>
<esql:get-string
column="SecTitle"/>
</SecTitle>
<SecContent>
<esql:get-string
column="SecContent"/>
</SecContent>
<!-- Get Chapter for every selected Section -->
<Chapter>
<esql:execute-query>
<esql:query>select
* from chapter where ChapID=<xsp:expr>chapter</xsp:expr> AND
Section=<xsp:expr>section</xsp:expr></esql:query>
<esql:results>
<esql:row-results>
<ChapTitle>
<esql:get-string
column="ChapTitle"/>
</ChapTitle>
<ChapContent>
<esql:get-string
column="ChapContent"/>
</ChapContent>
</esql:row-results>
</esql:results>
</esql:execute-query>
</Chapter>
</esql:row-results>
</esql:results>
</esql:execute-query>
</Section>
</esql:row-results>
</esql:results>
</esql:execute-query>
</esql:connection>
</Document>
</xsp:page>
myfile.xsl:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<xsl:template match="/">
<html>
<head/>
<body>
<xsl:for-each select="Document">
<br/>Titolo: <xsl:for-each
select="DocTitle">
<xsl:apply-templates/>
</xsl:for-each>
<br/>Oggetto: <xsl:for-each
select="DocObj">
<xsl:apply-templates/>
</xsl:for-each>
<br/>Versione:<xsl:for-each
select="DocVer">
<xsl:apply-templates/>
</xsl:for-each>
<br/>
<!-- Output Section -->
<br/> <xsl:for-each select="Section">
<br/>Sezione:<br/>Titolo:
<xsl:for-each select="SecTitle">
<xsl:apply-templates/>
</xsl:for-each>
<br/>Commento:
<xsl:for-each select="SecContent">
<xsl:apply-templates/>
</xsl:for-each>
<br/>
<br/>
<!-- Output Chapter -->
<xsl:for-each
select="Chapter">
<br/>Capitolo:<br/>Titolo:
<xsl:for-each select="ChapTitle">
<xsl:apply-templates/>
</xsl:for-each>
<br/>Commento:<xsl:for-each
select="ChapContent">
<xsl:apply-templates/>
</xsl:for-each>
<br/>
<br/>
</xsl:for-each>
<br/>
</xsl:for-each>
<br/>
<br/>
</xsl:for-each>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Re: tool xml/xsl ???
Posted by "Conrad F. D'Cruz" <co...@netswirl.com>.
I use Eclipse (open source IDE) for Java development with the XML Buddy
plug-in.
Conrad
Jessica Niewint wrote:
> apart from xml-spy ????
> (or is it the tool of the tools ???)
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: tool xml/xsl ???
Posted by Jessica Niewint <j....@kiosco.org>.
apart from xml-spy ????
(or is it the tool of the tools ???)
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: tool xml/xsl ???
Posted by Richard Reyes <ri...@voxsant.com>.
xmlspy?
----- Original Message -----
From: "Jessica Niewint" <j....@kiosco.org>
To: <co...@xml.apache.org>
Sent: Tuesday, October 01, 2002 4:04 AM
Subject: tool xml/xsl ???
> Could someone give an advice for a xml-tool ? Or a xsl wysiwyg
> (what-you-see-is-what-you-get) design-tool ?
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
>
>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: tool xml/xsl ???
Posted by "Ilya A. Kriveshko" <il...@kaon.com>.
I am using xslide - a major mode for Emacs (or XEmacs in my case.)
It does all the syntax highlighting you'd ever want, auto-completion,
templates, indentation, etc. It also can invoke an XSLT process so you
can view the results. Highly customizable, too, if you are into it.
http://www.xemacs.org or http://www.emacs.org
http://sourceforge.net/projects/xslide/
2c
--
Ilya
P.S.: If you've never used emacs, it's a steep learning curve, but
well-worth it if you are planning stick to it for a while.
> Could someone give an advice for a xml-tool ? Or a xsl wysiwyg
> (what-you-see-is-what-you-get) design-tool ?
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: tool xml/xsl ???
Posted by Antonio Gallardo Rivera <ag...@agsoftware.dnsalias.com>.
A good editor is for example:
http://www.jedit.org/
Also it have some plug-ins:
XML tree
XSLT Tranformer
XPath Tool
XML Insert.
and more....
Antonio Gallardo
Antonio Gallardo
El Martes, 01 de Octubre de 2002 06:09, Emmanuil Batsis (Manos) escribió:
> Jessica Niewint wrote:
> > Could someone give an advice for a xml-tool ? Or a xsl wysiwyg
> > (what-you-see-is-what-you-get) design-tool ?
>
> XML is itself WYSIWYG since it does not involve presentation info (with
> the exception of XHTML, XSL-FO, SVG etc).
>
> So, what you need is just a browser and viewers for some vocabularies.
>
> Currently, nothing lets you edit XML like a good text editor.
>
> Manos
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: tool xml/xsl ???
Posted by "Emmanuil Batsis (Manos)" <mb...@humanmarkup.org>.
Jessica Niewint wrote:
> Could someone give an advice for a xml-tool ? Or a xsl wysiwyg
> (what-you-see-is-what-you-get) design-tool ?
XML is itself WYSIWYG since it does not involve presentation info (with
the exception of XHTML, XSL-FO, SVG etc).
So, what you need is just a browser and viewers for some vocabularies.
Currently, nothing lets you edit XML like a good text editor.
Manos
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
RE: tool xml/xsl ???
Posted by Ryan Agler <ry...@hotmail.com>.
X-Emacs has some great XML editing modes. It's free.
-----Original Message-----
From: Jessica Niewint [mailto:j.niewint@kiosco.org]
Sent: Tuesday, October 01, 2002 5:04 AM
To: cocoon-users@xml.apache.org
Subject: tool xml/xsl ???
Could someone give an advice for a xml-tool ? Or a xsl wysiwyg
(what-you-see-is-what-you-get) design-tool ?
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
tool xml/xsl ???
Posted by Jessica Niewint <j....@kiosco.org>.
Could someone give an advice for a xml-tool ? Or a xsl wysiwyg
(what-you-see-is-what-you-get) design-tool ?
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
RE: Output xsl --- next trap
Posted by Jessica Niewint <j....@kiosco.org>.
At 19.48 30/09/2002 +0200, you wrote:
>Jessica,
>
>good, now I can sort it out:
>
>1) The XML produced by the XSP is not particolarly suited to the purpose;
>a better output is attached as myfile.xml (please, note
>the embedding of "chapter" and "paragraph" elements)
>
>2) The XSLT you wrote is "procedural", but should be "declarative"
>instead. A complete re-work of your XSLT is attached as
>myfile.xsl (I took the liberty of adding some HTML formatting to further
>clarify the document's structure)
Thank you so much ....
>At the end of the day:
>
><advices>
> <advice type="wise">
> Get yourself "XSLT" by Doug Tidwell (O'Reilly) and start
> studying it:
> XSLT does matter, you won't regret learning it
> </advice>
Ok, I will go and by it .... and study it ;-)
> <advice type="unabashed self-promoting">
> Get some mentoring by a Cocoon/XSLT consultant who happens to
> live in Italy...
> </advice>
first I have to convince someone (my company) to pay for it :-D (ma l'idea
giusta)
></advices>
>
>Best regards,
Grazie mille ancora per tutto l'aiuto che ci hai dato ! Jessica
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
RE: Output xsl --- next trap
Posted by Luca Morandini <lu...@tin.it>.
Jessica,
good, now I can sort it out:
1) The XML produced by the XSP is not particolarly suited to the purpose; a better output is attached as myfile.xml (please, note
the embedding of "chapter" and "paragraph" elements)
2) The XSLT you wrote is "procedural", but should be "declarative" instead. A complete re-work of your XSLT is attached as
myfile.xsl (I took the liberty of adding some HTML formatting to further clarify the document's structure)
At the end of the day:
<advices>
<advice type="wise">
Get yourself "XSLT" by Doug Tidwell (O'Reilly) and start studying it:
XSLT does matter, you won't regret learning it
</advice>
<advice type="unabashed self-promoting">
Get some mentoring by a Cocoon/XSLT consultant who happens to
live in Italy...
</advice>
</advices>
Best regards,
---------------------------------------------
Luca Morandini
GIS Consultant
lmorandini@ieee.org
http://utenti.tripod.it/lmorandini/index.html
---------------------------------------------
> -----Original Message-----
> From: Jessica Niewint [mailto:j.niewint@kiosco.org]
> Sent: Monday, September 30, 2002 6:40 PM
> To: cocoon-users@xml.apache.org
> Subject: RE: Output xsl --- next trap
>
>
>
> >you have a pipeline, do you ? You just have to comment the transformation
> >stage and change the serializer from HTML to XML of that
> >pipeline, something like:
> >
> ><map:match name="wildcard" pattern="foo.xml">
> > <map:generate type="serverpages" src="xsp/foo.xsp"/>
> ><!-- Commented out for debug
> > <map:transform type="xslt" src="bar.xsl"/>
> > <map:serialize type="html"/>
> >-->
> > <map:serialize type="xml"/> <!-- XML output for debug -->
> ></map:match>
>
> Thank you, that you have been so patient ... this is my xml out:
>
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <Document xsi:noNamespaceSchemaLocation="schema.xsd"
> xmlns:xspdoc="http://apache.org/cocoon/XSPDoc/v1"
> xmlns:esql="http://apache.org/cocoon/SQL/v2"
> xmlns:xsp="http://apache.org/xsp"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <DocObj>dummy content doc 1</DocObj>
> <DocTitle>title document 1</DocTitle>
> <DocVer>10</DocVer>
> <DocAuth>Author1</DocAuth>
> <DocDate>2002-09-19</DocDate>
> <Section>
> <SecTitle>Section A</SecTitle>
> <SecContent>Content of section A</SecContent>
> <Chapter>
> <ChapTitle>chapter 3</ChapTitle>
> <ChapContent>content chapter 3</ChapContent>
> <Paragraph>
> <ParaTitle>Paragraph 5</ParaTitle>
> <ParaContent>Content of Paragraph
> 5</ParaContent>
> <ParaTitle>Paragraph 4</ParaTitle>
> <ParaContent>Content of Paragraph
> 4</ParaContent>
> </Paragraph>
> <ChapTitle>chapter 2</ChapTitle>
> <ChapContent>content chapter 2</ChapContent>
> <Paragraph>
> <ParaTitle>Paragraph 2</ParaTitle>
> <ParaContent>Content of Paragraph
> 2</ParaContent>
> </Paragraph>
> <ChapTitle>chapter 1</ChapTitle>
> <ChapContent>content chapter 1</ChapContent>
> <Paragraph>
> <ParaTitle>Paragraph 1</ParaTitle>
> <ParaContent>Content of Paragraph
> 1</ParaContent>
> <ParaTitle>Paragraph 3</ParaTitle>
> <ParaContent>Content of Paragraph
> 3</ParaContent>
> </Paragraph>
> </Chapter>
> <SecTitle>Section B</SecTitle>
> <SecContent>Content of section B</SecContent>
> <Chapter>
> <ChapTitle>chapter 4</ChapTitle>
> <ChapContent>content chapter 4</ChapContent>
> <Paragraph>
> <ParaTitle>Paragraph 6</ParaTitle>
> <ParaContent>Content of Paragraph
> 6</ParaContent>
> </Paragraph>
> <ChapTitle>chapter 5</ChapTitle>
> <ChapContent>content chapter 5</ChapContent>
> <Paragraph>
> <ParaTitle>Paragraph 7</ParaTitle>
> <ParaContent>Content of Paragraph 7
> </ParaContent>
> </Paragraph>
> </Chapter>
> </Section>
> </Document>
>
>
>
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
RE: Output xsl --- next trap
Posted by Jessica Niewint <j....@kiosco.org>.
>you have a pipeline, do you ? You just have to comment the transformation
>stage and change the serializer from HTML to XML of that
>pipeline, something like:
>
><map:match name="wildcard" pattern="foo.xml">
> <map:generate type="serverpages" src="xsp/foo.xsp"/>
><!-- Commented out for debug
> <map:transform type="xslt" src="bar.xsl"/>
> <map:serialize type="html"/>
>-->
> <map:serialize type="xml"/> <!-- XML output for debug -->
></map:match>
Thank you, that you have been so patient ... this is my xml out:
<?xml version="1.0" encoding="UTF-8"?>
<Document xsi:noNamespaceSchemaLocation="schema.xsd"
xmlns:xspdoc="http://apache.org/cocoon/XSPDoc/v1"
xmlns:esql="http://apache.org/cocoon/SQL/v2"
xmlns:xsp="http://apache.org/xsp"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<DocObj>dummy content doc 1</DocObj>
<DocTitle>title document 1</DocTitle>
<DocVer>10</DocVer>
<DocAuth>Author1</DocAuth>
<DocDate>2002-09-19</DocDate>
<Section>
<SecTitle>Section A</SecTitle>
<SecContent>Content of section A</SecContent>
<Chapter>
<ChapTitle>chapter 3</ChapTitle>
<ChapContent>content chapter 3</ChapContent>
<Paragraph>
<ParaTitle>Paragraph 5</ParaTitle>
<ParaContent>Content of Paragraph
5</ParaContent>
<ParaTitle>Paragraph 4</ParaTitle>
<ParaContent>Content of Paragraph
4</ParaContent>
</Paragraph>
<ChapTitle>chapter 2</ChapTitle>
<ChapContent>content chapter 2</ChapContent>
<Paragraph>
<ParaTitle>Paragraph 2</ParaTitle>
<ParaContent>Content of Paragraph
2</ParaContent>
</Paragraph>
<ChapTitle>chapter 1</ChapTitle>
<ChapContent>content chapter 1</ChapContent>
<Paragraph>
<ParaTitle>Paragraph 1</ParaTitle>
<ParaContent>Content of Paragraph
1</ParaContent>
<ParaTitle>Paragraph 3</ParaTitle>
<ParaContent>Content of Paragraph
3</ParaContent>
</Paragraph>
</Chapter>
<SecTitle>Section B</SecTitle>
<SecContent>Content of section B</SecContent>
<Chapter>
<ChapTitle>chapter 4</ChapTitle>
<ChapContent>content chapter 4</ChapContent>
<Paragraph>
<ParaTitle>Paragraph 6</ParaTitle>
<ParaContent>Content of Paragraph
6</ParaContent>
</Paragraph>
<ChapTitle>chapter 5</ChapTitle>
<ChapContent>content chapter 5</ChapContent>
<Paragraph>
<ParaTitle>Paragraph 7</ParaTitle>
<ParaContent>Content of Paragraph 7
</ParaContent>
</Paragraph>
</Chapter>
</Section>
</Document>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
RE: Output xsl --- next trap
Posted by Luca Morandini <lu...@tin.it>.
Jessica,
you have a pipeline, do you ? You just have to comment the transformation stage and change the serializer from HTML to XML of that
pipeline, something like:
<map:match name="wildcard" pattern="foo.xml">
<map:generate type="serverpages" src="xsp/foo.xsp"/>
<!-- Commented out for debug
<map:transform type="xslt" src="bar.xsl"/>
<map:serialize type="html"/>
-->
<map:serialize type="xml"/> <!-- XML output for debug -->
</map:match>
Best regards,
P.S.
You could use "views" to the same effect, but this is an *advanced* topic :)
---------------------------------------------
Luca Morandini
GIS Consultant
lmorandini@ieee.org
http://utenti.tripod.it/lmorandini/index.html
---------------------------------------------
> -----Original Message-----
> From: Jessica Niewint [mailto:j.niewint@kiosco.org]
> Sent: Monday, September 30, 2002 4:16 PM
> To: cocoon-users@xml.apache.org
> Subject: RE: Output xsl --- next trap
>
>
> At 15.24 30/09/2002 +0200, you wrote:
> >Jessica,
> >
> >ok, let's get this straight:
> >
> >1) the myfile.xml XML (actually, an XSP file) produces an XML document (as
> >a SAX stream)
> >2) the myfile.xsl reads this SAX stream, transforms it, and produces yet
> >another SAX stream (which happens to be XHTML)
> >3) your browser displays it
>
> OK, my problem is: How can make the output of my xml file ??? I started
> xml with Cocoon. So I only "know" how to generate my xml document via xml
> -> xsl and the information of my sub-sitemap.
>
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
RE: Output xsl --- next trap
Posted by Jessica Niewint <j....@kiosco.org>.
At 15.24 30/09/2002 +0200, you wrote:
>Jessica,
>
>ok, let's get this straight:
>
>1) the myfile.xml XML (actually, an XSP file) produces an XML document (as
>a SAX stream)
>2) the myfile.xsl reads this SAX stream, transforms it, and produces yet
>another SAX stream (which happens to be XHTML)
>3) your browser displays it
OK, my problem is: How can make the output of my xml file ??? I started
xml with Cocoon. So I only "know" how to generate my xml document via xml
-> xsl and the information of my sub-sitemap.
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
RE: Output xsl --- next trap
Posted by Luca Morandini <lu...@tin.it>.
Jessica,
ok, let's get this straight:
1) the myfile.xml XML (actually, an XSP file) produces an XML document (as a SAX stream)
2) the myfile.xsl reads this SAX stream, transforms it, and produces yet another SAX stream (which happens to be XHTML)
3) your browser displays it
I'd like to see the output of step 1 (I mean, the XML you retrieve from the DBMS).
My idea is that there is a way to do what you want by modifying your XSL code.
Best regards,
---------------------------------------------
Luca Morandini
GIS Consultant
lmorandini@ieee.org
http://utenti.tripod.it/lmorandini/index.html
---------------------------------------------
> -----Original Message-----
> From: Jessica Niewint [mailto:j.niewint@kiosco.org]
> Sent: Monday, September 30, 2002 3:14 PM
> To: cocoon-users@xml.apache.org
> Subject: RE: Output xsl --- next trap
>
>
> At 13.24 30/09/2002 +0200, you wrote:
> >Jessica,
> >
> >ahem... I wrote: "could you please post the output of myfile.xml (in other
> >words, the input of myfile.xsl)", while you sent me the
> >"final" output (the one outputted by myfile.xsl).
> >
> >Best regards,
>
> I am sorry, but I haven't understand where is the difference between my xml
> file and the "output" of my xml file ???
> How will I get the output of my xml file?
> Following is the output of my xml file opened with IE ... but I have really
> no idea what do you want to see ... sorry ...
>
> <?xml version="1.0" encoding="UTF-8" ?>
> - <xsp:page laguage="java" xmlns:xsp="http://apache.org/xsp"
> xmlns:esql="http://apache.org/cocoon/SQL/v2">
> - <!--
> Get Document
> -->
> - <Document xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:noNamespaceSchemaLocation="schema.xsd"
> xmlns:esql="http://apache.org/cocoon/SQL/v2"
> xmlns:xsp="http://apache.org/xsp">
> - <esql:connection>
> <esql:pool>xmldb</esql:pool>
> <xsp:logic>String document= "1";</xsp:logic>
> - <esql:execute-query>
> - <esql:query>
> select * from document where DocID=
> <xsp:expr>document</xsp:expr>
> </esql:query>
> - <esql:results>
> - <esql:row-results>
> - <DocObj>
> <esql:get-string column="DocObject" />
> </DocObj>
> - <DocTitle>
> <esql:get-string column="DocTitle" />
> </DocTitle>
> - <DocVer>
> <esql:get-string column="DocVersion" />
> </DocVer>
> - <DocAuth>
> <esql:get-string column="DocAuthor" />
> </DocAuth>
> - <DocDate>
> <esql:get-date column="DocData" />
> </DocDate>
> - <!--
> Get Sections
> -->
> - <Section>
> - <esql:execute-query>
> - <esql:query>
> select BuildSecID, SecID from secbuild where DocID=
> <xsp:expr>document</xsp:expr>
> order by SecOrdine
> </esql:query>
> - <esql:results>
> - <esql:row-results>
> - <xsp:logic>
> String buildSecID =
> <esql:get-string column="BuildSecID" />
> ; String section =
> <esql:get-string column="SecID" />
> ;
> </xsp:logic>
> - <esql:execute-query>
> - <esql:query>
> select * from section where SecID=
> <xsp:expr>section</xsp:expr>
> </esql:query>
> - <esql:results>
> - <esql:row-results>
> - <SecTitle>
> <esql:get-string column="SecTitle" />
> </SecTitle>
> - <SecContent>
> <esql:get-string column="SecContent" />
> </SecContent>
> - <!--
> Get Chapter
> -->
> - <Chapter>
> - <esql:execute-query>
> - <esql:query>
> select BuildChapID, ChapID from chapbuild where BuildSecID=
> <xsp:expr>buildSecID</xsp:expr>
> order by ChapOrdine
> </esql:query>
> - <esql:results>
> - <esql:row-results>
> - <xsp:logic>
> String buildchapID =
> <esql:get-string column="BuildChapID" />
> ; String chapter =
> <esql:get-string column="ChapID" />
> ;
> </xsp:logic>
> - <esql:execute-query>
> - <esql:query>
> select * from chapter where ChapID=
> <xsp:expr>chapter</xsp:expr>
> </esql:query>
> - <esql:results>
> - <esql:row-results>
> - <ChapTitle>
> <esql:get-string column="ChapTitle" />
> </ChapTitle>
> - <ChapContent>
> <esql:get-string column="ChapContent" />
> </ChapContent>
> - <Paragraph>
> - <esql:execute-query>
> - <esql:query>
> select ParaID from parabuild where BuildChapID=
> <xsp:expr>chapter</xsp:expr>
> order by ParaOrdine
> </esql:query>
> - <esql:results>
> - <esql:row-results>
> - <xsp:logic>
> String paragraph =
> <esql:get-string column="ParaID" />
> ;
> </xsp:logic>
> - <esql:execute-query>
> - <esql:query>
> select * from paragraph where ParaID=
> <xsp:expr>paragraph</xsp:expr>
> </esql:query>
> - <esql:results>
> - <esql:row-results>
> - <ParaTitle>
> <esql:get-string column="ParaTitle" />
> </ParaTitle>
> - <ParaContent>
> <esql:get-string column="ParaContent" />
> </ParaContent>
> </esql:row-results>
> </esql:results>
> </esql:execute-query>
> </esql:row-results>
> </esql:results>
> </esql:execute-query>
> </Paragraph>
> </esql:row-results>
> </esql:results>
> </esql:execute-query>
> </esql:row-results>
> </esql:results>
> </esql:execute-query>
> </Chapter>
> </esql:row-results>
> </esql:results>
> </esql:execute-query>
> </esql:row-results>
> </esql:results>
> </esql:execute-query>
> </Section>
> </esql:row-results>
> </esql:results>
> </esql:execute-query>
> </esql:connection>
> </Document>
> </xsp:page>
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
RE: Output xsl --- next trap
Posted by Jessica Niewint <j....@kiosco.org>.
At 13.24 30/09/2002 +0200, you wrote:
>Jessica,
>
>ahem... I wrote: "could you please post the output of myfile.xml (in other
>words, the input of myfile.xsl)", while you sent me the
>"final" output (the one outputted by myfile.xsl).
>
>Best regards,
I am sorry, but I haven't understand where is the difference between my xml
file and the "output" of my xml file ???
How will I get the output of my xml file?
Following is the output of my xml file opened with IE ... but I have really
no idea what do you want to see ... sorry ...
<?xml version="1.0" encoding="UTF-8" ?>
- <xsp:page laguage="java" xmlns:xsp="http://apache.org/xsp"
xmlns:esql="http://apache.org/cocoon/SQL/v2">
- <!--
Get Document
-->
- <Document xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="schema.xsd"
xmlns:esql="http://apache.org/cocoon/SQL/v2"
xmlns:xsp="http://apache.org/xsp">
- <esql:connection>
<esql:pool>xmldb</esql:pool>
<xsp:logic>String document= "1";</xsp:logic>
- <esql:execute-query>
- <esql:query>
select * from document where DocID=
<xsp:expr>document</xsp:expr>
</esql:query>
- <esql:results>
- <esql:row-results>
- <DocObj>
<esql:get-string column="DocObject" />
</DocObj>
- <DocTitle>
<esql:get-string column="DocTitle" />
</DocTitle>
- <DocVer>
<esql:get-string column="DocVersion" />
</DocVer>
- <DocAuth>
<esql:get-string column="DocAuthor" />
</DocAuth>
- <DocDate>
<esql:get-date column="DocData" />
</DocDate>
- <!--
Get Sections
-->
- <Section>
- <esql:execute-query>
- <esql:query>
select BuildSecID, SecID from secbuild where DocID=
<xsp:expr>document</xsp:expr>
order by SecOrdine
</esql:query>
- <esql:results>
- <esql:row-results>
- <xsp:logic>
String buildSecID =
<esql:get-string column="BuildSecID" />
; String section =
<esql:get-string column="SecID" />
;
</xsp:logic>
- <esql:execute-query>
- <esql:query>
select * from section where SecID=
<xsp:expr>section</xsp:expr>
</esql:query>
- <esql:results>
- <esql:row-results>
- <SecTitle>
<esql:get-string column="SecTitle" />
</SecTitle>
- <SecContent>
<esql:get-string column="SecContent" />
</SecContent>
- <!--
Get Chapter
-->
- <Chapter>
- <esql:execute-query>
- <esql:query>
select BuildChapID, ChapID from chapbuild where BuildSecID=
<xsp:expr>buildSecID</xsp:expr>
order by ChapOrdine
</esql:query>
- <esql:results>
- <esql:row-results>
- <xsp:logic>
String buildchapID =
<esql:get-string column="BuildChapID" />
; String chapter =
<esql:get-string column="ChapID" />
;
</xsp:logic>
- <esql:execute-query>
- <esql:query>
select * from chapter where ChapID=
<xsp:expr>chapter</xsp:expr>
</esql:query>
- <esql:results>
- <esql:row-results>
- <ChapTitle>
<esql:get-string column="ChapTitle" />
</ChapTitle>
- <ChapContent>
<esql:get-string column="ChapContent" />
</ChapContent>
- <Paragraph>
- <esql:execute-query>
- <esql:query>
select ParaID from parabuild where BuildChapID=
<xsp:expr>chapter</xsp:expr>
order by ParaOrdine
</esql:query>
- <esql:results>
- <esql:row-results>
- <xsp:logic>
String paragraph =
<esql:get-string column="ParaID" />
;
</xsp:logic>
- <esql:execute-query>
- <esql:query>
select * from paragraph where ParaID=
<xsp:expr>paragraph</xsp:expr>
</esql:query>
- <esql:results>
- <esql:row-results>
- <ParaTitle>
<esql:get-string column="ParaTitle" />
</ParaTitle>
- <ParaContent>
<esql:get-string column="ParaContent" />
</ParaContent>
</esql:row-results>
</esql:results>
</esql:execute-query>
</esql:row-results>
</esql:results>
</esql:execute-query>
</Paragraph>
</esql:row-results>
</esql:results>
</esql:execute-query>
</esql:row-results>
</esql:results>
</esql:execute-query>
</Chapter>
</esql:row-results>
</esql:results>
</esql:execute-query>
</esql:row-results>
</esql:results>
</esql:execute-query>
</Section>
</esql:row-results>
</esql:results>
</esql:execute-query>
</esql:connection>
</Document>
</xsp:page>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
RE: Output xsl --- next trap
Posted by Luca Morandini <lu...@tin.it>.
Jessica,
ahem... I wrote: "could you please post the output of myfile.xml (in other words, the input of myfile.xsl)", while you sent me the
"final" output (the one outputted by myfile.xsl).
Best regards,
---------------------------------------------
Luca Morandini
GIS Consultant
lmorandini@ieee.org
http://utenti.tripod.it/lmorandini/index.html
---------------------------------------------
> -----Original Message-----
> From: Jessica Niewint [mailto:j.niewint@kiosco.org]
> Sent: Monday, September 30, 2002 11:29 AM
> To: cocoon-users@xml.apache.org
> Subject: RE: Output xsl --- next trap
>
>
> At 11.00 30/09/2002 +0200, you wrote:
>
> Thank you a lot for your answer :
>
> > > I hope you wanted the output of the xml file in the browser ....
> > >
> >
> >Well, I'd like the "tagged" version of it ("View / Page source" would do)
>
> My "tagged" version:
>
>
> html xmlns:xs="http://www.w3.org/2001/XMLSchema">
> <head>
> <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
> </head>
> <body>
> <br>title document 1<br>
> <br>dummy content doc 1<br>
> 10
> <br>Author1<br>
> <br>
> <br>Section A Section B
> <br>Content of section A Content of section B<br>
> <br>
> <br>chapter 3 chapter 2 chapter 1
> <br>content chapter 3 content chapter 2 content chapter 1
> <br>
> <br>
> <br>Paragraph 5 Paragraph 4
> <br> Content of Paragraph 5 Content of Paragraph 4
> <br>
> <br>
> <br>Paragraph 2
> <br>Content of Paragraph 2
> <br>
> <br>
> <br>Paragraph 1 Paragraph 3
> <br>Content of Paragraph 1 Content of Paragraph 3
> <br>
> <br>
> <br>
> <br>chapter 4 chapter 5
> <br>content chapter 4 content chapter 5
> <br>
> <br>
> <br>Paragraph 6
> <br>Content of Paragraph 6
> <br>
> <br>
> <br>Paragraph 7
> <br>Content of Paragraph 7
> <br>
> <br>
> <br>
> <br>
> <br>
> <br>
> </body>
> </html>
>
>
>
>
>
>
> > > Because I work in Italy ?!
> >
> >Makes sense.
>
> Hope so !
>
>
>
>
> >Best regards,
> >
> >---------------------------------------------
> > Luca Morandini
> > GIS Consultant
> > lmorandini@ieee.org
> >http://utenti.tripod.it/lmorandini/index.html
> >---------------------------------------------
> >
> >
> > > -----Original Message-----
> > > From: Jessica Niewint [mailto:j.niewint@kiosco.org]
> > > Sent: Monday, September 30, 2002 10:47 AM
> > > To: cocoon-users@xml.apache.org
> > > Subject: RE: Output xsl --- next trap
> > >
> > >
> > > At 20.40 27/09/2002 +0200, you wrote:
> > > >Jessica,
> > > >
> > > >three things:
> > > >
> > > >1) could you please post the output of myfile.xml (in other words, the
> > > >input of myfile.xsl) ?
> > >
> > > I hope you wanted the output of the xml file in the browser ....
> > >
> > >
> > > output:
> > >
> > > title document 1
> > >
> > > dummy content doc 1
> > > 10
> > > Author1
> > >
> > >
> > > Section A Section B
> > > Content of section A Content of section B
> > >
> > >
> > > chapter 3 chapter 2 chapter 1
> > > content chapter 3 content chapter 2 content chapter 1
> > >
> > >
> > > Paragraph 5 Paragraph 4
> > > Content of Paragraph 5 Content of Paragraph 4
> > >
> > >
> > > Paragraph 2
> > > Content of Paragraph 2
> > >
> > >
> > > Paragraph 1 Paragraph 3
> > > Content of Paragraph 1 Content of Paragraph 3
> > >
> > >
> > >
> > > chapter 4 chapter 5
> > > content chapter 4 content chapter 5
> > >
> > >
> > > Paragraph 6
> > > Content of Paragraph 6
> > >
> > >
> > > Paragraph 7
> > > Content of Paragraph 7
> > >
> > >
> > >
> > >
> > > >2) could you tell me why the output is in Italian ?
> > >
> > >
> > > Because I work in Italy ?!
> > >
> > >
> > > >3) could you use plain text for messages ?
> > >
> > > Yes, it was a mistake (I was too quick with my mouse click ;-)).
> > > Sorry again
> > >
> > >
> > > >Best regards,
> > > >
> > > >---------------------------------------------
> > > > Luca Morandini
> > > > GIS Consultant
> > > > lmorandini@ieee.org
> > > >http://utenti.tripod.it/lmorandini/index.html
> > >
> > >
> > >
> > >
> > > >HI it's me again.
> > > >
> > > >With this xml file I get the right chapters for the right sections and the
> > > >right sections for the right document.
> > > >Only that my output is something like this
> > > >document
> > > >section A section B
> > > >chapter 1 chapter 2
> > > >chapter 3
> > > >
> > > >
> > > >I wanted to generate a document structure like this:
> > > >document
> > > >section A
> > > >chapter 1
> > > >chapter 2
> > > >section B
> > > >chapter 3
> > > >
> > > >
> > > >
> > > >I have no idea if my way how to use the esql -query is wrong or if I have
> > > >change the xsl file.
> > > >
> > > >But may some one just give me a hint ...
> > > >
> > > >Thank you in advance ...
> > > >J.
> > > >
> > > >I will post again my xml and my xsl file. Sorry for this long posting.
> > > <?xml version="1.0" encoding="UTF-8"?>
> > > <xsp:page laguage="java" xmlns:xsp="http://apache.org/xsp"
> > > xmlns:esql="http://apache.org/cocoon/SQL/v2">
> > > <!-- Get Document -->
> > > <Document xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > > xsi:noNamespaceSchemaLocation="schema.xsd"
> > > xmlns:esql="http://apache.org/cocoon/SQL/v2"
> > xmlns:xsp="http://apache.org/xsp">
> > > <esql:connection>
> > > <esql:pool>xmldb</esql:pool>
> > > <xsp:logic> String document= "1";</xsp:logic>
> > > <esql:execute-query>
> > > <esql:query>select * from document where
> > > DocID=<xsp:expr>document</xsp:expr>
> > > </esql:query>
> > > <esql:results>
> > > <esql:row-results>
> > > <DocObj>
> > > <esql:get-string
> > > column="DocObject"/>
> > > </DocObj>
> > > <DocTitle>
> > > <esql:get-string
> > > column="DocTitle"/>
> > > </DocTitle>
> > > <DocVer>
> > > <esql:get-string
> > > column="DocVersion"/>
> > > </DocVer>
> > > <DocAuth>
> > > <esql:get-string
> > > column="DocAuthor"/>
> > > </DocAuth>
> > > <DocDate>
> > > <esql:get-date
> > > column="DocData"/>
> > > </DocDate>
> > > <!-- Get Sections-->
> > > <Section>
> > >
> > <esql:execute-query>
> > >
> > <esql:query>select
> > > BuildSecID, SecID from secbuild where DocID=<xsp:expr>document</xsp:expr>
> > > order by SecOrdine</esql:query>
> > >
> > <esql:results>
> > >
> > <esql:row-results>
> > >
> > <xsp:logic>
> > >
> > String
> > > buildSecID = <esql:get-string column="BuildSecID"/>;
> > >
> > String
> > > section = <esql:get-string column="SecID"/>;
> > >
> > </xsp:logic>
> > >
> > <esql:execute-query>
> > >
> > <esql:query>select
> > > * from section where SecID=<xsp:expr>section</xsp:expr>
> > >
> > </esql:query>
> > >
> > <esql:results>
> > >
> > <esql:row-results>
> > >
> > <SecTitle>
> > >
> > <esql:get-string
> > > column="SecTitle"/>
> > >
> > </SecTitle>
> > >
> > <SecContent>
> > >
> > <esql:get-string
> > > column="SecContent"/>
> > >
> > </SecContent>
> > >
> > <!--
> > > Get Chapter -->
> > >
> > <Chapter>
> > >
> > > <esql:execute-query>
> > >
> > > <esql:query>select
> > > BuildChapID, ChapID from chapbuild where
> > > BuildSecID=<xsp:expr>buildSecID</xsp:expr> order by ChapOrdine</esql:query>
> > >
> > > <esql:results>
> > >
> > > <esql:row-results>
> > >
> > > <xsp:logic>
> > >
> > String
> > > buildchapID = <esql:get-string column="BuildChapID"/>;
> > >
> > String
> > > chapter = <esql:get-string column="ChapID"/>;
> > >
> > </xsp:logic>
> > >
> > > <esql:execute-query>
> > >
> > > <esql:query>select
> > > * from chapter where ChapID=<xsp:expr>chapter</xsp:expr>
> > >
> > > </esql:query>
> > >
> > > <esql:results>
> > >
> > > <esql:row-results>
> > >
> > > <ChapTitle>
> > >
> > > <esql:get-string
> > > column="ChapTitle"/>
> > >
> > > </ChapTitle>
> > >
> > > <ChapContent>
> > >
> > > <esql:get-string
> > > column="ChapContent"/>
> > >
> > > </ChapContent>
> > >
> > > <Paragraph>
> > >
> > > <esql:execute-query>
> > >
> > > <esql:query>select
> > > ParaID from parabuild where BuildChapID=<xsp:expr>chapter</xsp:expr> order
> > > by ParaOrdine</esql:query>
> > >
> > > <esql:results>
> > >
> > >
> > <esql:row-results>
> > >
> > >
> > <xsp:logic>
> > >
> > > String
> > > paragraph = <esql:get-string column="ParaID"/>;
> > >
> > > </xsp:logic>
> > >
> > >
> > <esql:execute-query>
> > >
> > >
> > <esql:query>select
> > > * from paragraph where ParaID=<xsp:expr>paragraph</xsp:expr>
> > >
> > >
> > </esql:query>
> > >
> > >
> > <esql:results>
> > >
> > >
> > <esql:row-results>
> > >
> > >
> > <ParaTitle>
> > >
> > >
> > <esql:get-string
> > > column="ParaTitle"/>
> > >
> > >
> > </ParaTitle>
> > >
> > >
> > <ParaContent>
> > >
> > >
> > <esql:get-string
> > > column="ParaContent"/>
> > >
> > >
> > </ParaContent>
> > >
> > >
> > </esql:row-results>
> > >
> > >
> > </esql:results>
> > >
> > >
> > </esql:execute-query>
> > >
> > >
> > </esql:row-results>
> > >
> > > </esql:results>
> > >
> > > </esql:execute-query>
> > >
> > > </Paragraph>
> > >
> > > </esql:row-results>
> > >
> > > </esql:results>
> > >
> > > </esql:execute-query>
> > >
> > > </esql:row-results>
> > >
> > > </esql:results>
> > >
> > > </esql:execute-query>
> > >
> > </Chapter>
> > >
> > </esql:row-results>
> > >
> > </esql:results>
> > >
> > </esql:execute-query>
> > >
> > </esql:row-results>
> > >
> > </esql:results>
> > >
> > </esql:execute-query>
> > > </Section>
> > > </esql:row-results>
> > > </esql:results>
> > > </esql:execute-query>
> > > </esql:connection>
> > > </Document>
> > > </xsp:page>
> > >
> > >
> > > >myfile.xsl:
> > > <?xml version="1.0" encoding="UTF-8"?>
> > > <xsl:stylesheet version="1.0"
> > > xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> > > xmlns:xs="http://www.w3.org/2001/XMLSchema">
> > > <xsl:template match="/">
> > > <html>
> > > <head/>
> > > <body>
> > > <xsl:for-each select="Document">
> > > <br/>
> > > <xsl:for-each select="DocTitle">
> > > <xsl:apply-templates/>
> > > </xsl:for-each>
> > > <br/>
> > > <br/>
> > > <xsl:for-each select="DocObj">
> > > <xsl:apply-templates/>
> > > </xsl:for-each>
> > > <br/>
> > > <xsl:for-each select="DocVer">
> > > <xsl:apply-templates/>
> > > </xsl:for-each>
> > > <br/>
> > > <xsl:for-each select="DocAuth">
> > > <xsl:apply-templates/>
> > > </xsl:for-each>
> > > <br/>
> > > <br/>
> > > <xsl:for-each select="Section">
> > > <br/>
> > > <xsl:for-each
> > > select="SecTitle">
> > >
> > <xsl:apply-templates/>
> > > </xsl:for-each>
> > > <br/>
> > > <xsl:for-each
> > > select="SecContent">
> > >
> > <xsl:apply-templates/>
> > > </xsl:for-each>
> > > <br/>
> > > <br/>
> > > <xsl:for-each
> > > select="Chapter">
> > > <br/>
> > > <xsl:for-each
> > > select="ChapTitle">
> > >
> > <xsl:apply-templates/>
> > > </xsl:for-each>
> > > <br/>
> > > <xsl:for-each
> > > select="ChapContent">
> > >
> > <xsl:apply-templates/>
> > > </xsl:for-each>
> > > <br/>
> > > <br/>
> > > <xsl:for-each
> > > select="Paragraph">
> > > <br/>
> > >
> > <xsl:for-each
> > > select="ParaTitle">
> > >
> > <xsl:apply-templates/>
> > >
> > </xsl:for-each>
> > > <br/>
> > >
> > <xsl:for-each
> > > select="ParaContent">
> > >
> > <xsl:apply-templates/>
> > >
> > </xsl:for-each>
> > > <br/>
> > > <br/>
> > > </xsl:for-each>
> > > <br/>
> > > </xsl:for-each>
> > > <br/>
> > > </xsl:for-each>
> > > <br/>
> > > <br/>
> > > </xsl:for-each>
> > > </body>
> > > </html>
> > > </xsl:template>
> > > </xsl:stylesheet>
> > >
> > >
> > > ---------------------------------------------------------------------
> > > Please check that your question has not already been answered in the
> > > FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
> > >
> > > To unsubscribe, e-mail: <co...@xml.apache.org>
> > > For additional commands, e-mail: <co...@xml.apache.org>
> > >
> >
> >
> >---------------------------------------------------------------------
> >Please check that your question has not already been answered in the
> >FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
> >
> >To unsubscribe, e-mail: <co...@xml.apache.org>
> >For additional commands, e-mail: <co...@xml.apache.org>
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
RE: Output xsl --- next trap
Posted by Jessica Niewint <j....@kiosco.org>.
At 11.00 30/09/2002 +0200, you wrote:
Thank you a lot for your answer :
> > I hope you wanted the output of the xml file in the browser ....
> >
>
>Well, I'd like the "tagged" version of it ("View / Page source" would do)
My "tagged" version:
html xmlns:xs="http://www.w3.org/2001/XMLSchema">
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<br>title document 1<br>
<br>dummy content doc 1<br>
10
<br>Author1<br>
<br>
<br>Section A Section B
<br>Content of section A Content of section B<br>
<br>
<br>chapter 3 chapter 2 chapter 1
<br>content chapter 3 content chapter 2 content chapter 1
<br>
<br>
<br>Paragraph 5 Paragraph 4
<br> Content of Paragraph 5 Content of Paragraph 4
<br>
<br>
<br>Paragraph 2
<br>Content of Paragraph 2
<br>
<br>
<br>Paragraph 1 Paragraph 3
<br>Content of Paragraph 1 Content of Paragraph 3
<br>
<br>
<br>
<br>chapter 4 chapter 5
<br>content chapter 4 content chapter 5
<br>
<br>
<br>Paragraph 6
<br>Content of Paragraph 6
<br>
<br>
<br>Paragraph 7
<br>Content of Paragraph 7
<br>
<br>
<br>
<br>
<br>
<br>
</body>
</html>
> > Because I work in Italy ?!
>
>Makes sense.
Hope so !
>Best regards,
>
>---------------------------------------------
> Luca Morandini
> GIS Consultant
> lmorandini@ieee.org
>http://utenti.tripod.it/lmorandini/index.html
>---------------------------------------------
>
>
> > -----Original Message-----
> > From: Jessica Niewint [mailto:j.niewint@kiosco.org]
> > Sent: Monday, September 30, 2002 10:47 AM
> > To: cocoon-users@xml.apache.org
> > Subject: RE: Output xsl --- next trap
> >
> >
> > At 20.40 27/09/2002 +0200, you wrote:
> > >Jessica,
> > >
> > >three things:
> > >
> > >1) could you please post the output of myfile.xml (in other words, the
> > >input of myfile.xsl) ?
> >
> > I hope you wanted the output of the xml file in the browser ....
> >
> >
> > output:
> >
> > title document 1
> >
> > dummy content doc 1
> > 10
> > Author1
> >
> >
> > Section A Section B
> > Content of section A Content of section B
> >
> >
> > chapter 3 chapter 2 chapter 1
> > content chapter 3 content chapter 2 content chapter 1
> >
> >
> > Paragraph 5 Paragraph 4
> > Content of Paragraph 5 Content of Paragraph 4
> >
> >
> > Paragraph 2
> > Content of Paragraph 2
> >
> >
> > Paragraph 1 Paragraph 3
> > Content of Paragraph 1 Content of Paragraph 3
> >
> >
> >
> > chapter 4 chapter 5
> > content chapter 4 content chapter 5
> >
> >
> > Paragraph 6
> > Content of Paragraph 6
> >
> >
> > Paragraph 7
> > Content of Paragraph 7
> >
> >
> >
> >
> > >2) could you tell me why the output is in Italian ?
> >
> >
> > Because I work in Italy ?!
> >
> >
> > >3) could you use plain text for messages ?
> >
> > Yes, it was a mistake (I was too quick with my mouse click ;-)).
> > Sorry again
> >
> >
> > >Best regards,
> > >
> > >---------------------------------------------
> > > Luca Morandini
> > > GIS Consultant
> > > lmorandini@ieee.org
> > >http://utenti.tripod.it/lmorandini/index.html
> >
> >
> >
> >
> > >HI it's me again.
> > >
> > >With this xml file I get the right chapters for the right sections and the
> > >right sections for the right document.
> > >Only that my output is something like this
> > >document
> > >section A section B
> > >chapter 1 chapter 2
> > >chapter 3
> > >
> > >
> > >I wanted to generate a document structure like this:
> > >document
> > >section A
> > >chapter 1
> > >chapter 2
> > >section B
> > >chapter 3
> > >
> > >
> > >
> > >I have no idea if my way how to use the esql -query is wrong or if I have
> > >change the xsl file.
> > >
> > >But may some one just give me a hint ...
> > >
> > >Thank you in advance ...
> > >J.
> > >
> > >I will post again my xml and my xsl file. Sorry for this long posting.
> > <?xml version="1.0" encoding="UTF-8"?>
> > <xsp:page laguage="java" xmlns:xsp="http://apache.org/xsp"
> > xmlns:esql="http://apache.org/cocoon/SQL/v2">
> > <!-- Get Document -->
> > <Document xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > xsi:noNamespaceSchemaLocation="schema.xsd"
> > xmlns:esql="http://apache.org/cocoon/SQL/v2"
> xmlns:xsp="http://apache.org/xsp">
> > <esql:connection>
> > <esql:pool>xmldb</esql:pool>
> > <xsp:logic> String document= "1";</xsp:logic>
> > <esql:execute-query>
> > <esql:query>select * from document where
> > DocID=<xsp:expr>document</xsp:expr>
> > </esql:query>
> > <esql:results>
> > <esql:row-results>
> > <DocObj>
> > <esql:get-string
> > column="DocObject"/>
> > </DocObj>
> > <DocTitle>
> > <esql:get-string
> > column="DocTitle"/>
> > </DocTitle>
> > <DocVer>
> > <esql:get-string
> > column="DocVersion"/>
> > </DocVer>
> > <DocAuth>
> > <esql:get-string
> > column="DocAuthor"/>
> > </DocAuth>
> > <DocDate>
> > <esql:get-date
> > column="DocData"/>
> > </DocDate>
> > <!-- Get Sections-->
> > <Section>
> >
> <esql:execute-query>
> >
> <esql:query>select
> > BuildSecID, SecID from secbuild where DocID=<xsp:expr>document</xsp:expr>
> > order by SecOrdine</esql:query>
> >
> <esql:results>
> >
> <esql:row-results>
> >
> <xsp:logic>
> >
> String
> > buildSecID = <esql:get-string column="BuildSecID"/>;
> >
> String
> > section = <esql:get-string column="SecID"/>;
> >
> </xsp:logic>
> >
> <esql:execute-query>
> >
> <esql:query>select
> > * from section where SecID=<xsp:expr>section</xsp:expr>
> >
> </esql:query>
> >
> <esql:results>
> >
> <esql:row-results>
> >
> <SecTitle>
> >
> <esql:get-string
> > column="SecTitle"/>
> >
> </SecTitle>
> >
> <SecContent>
> >
> <esql:get-string
> > column="SecContent"/>
> >
> </SecContent>
> >
> <!--
> > Get Chapter -->
> >
> <Chapter>
> >
> > <esql:execute-query>
> >
> > <esql:query>select
> > BuildChapID, ChapID from chapbuild where
> > BuildSecID=<xsp:expr>buildSecID</xsp:expr> order by ChapOrdine</esql:query>
> >
> > <esql:results>
> >
> > <esql:row-results>
> >
> > <xsp:logic>
> >
> String
> > buildchapID = <esql:get-string column="BuildChapID"/>;
> >
> String
> > chapter = <esql:get-string column="ChapID"/>;
> >
> </xsp:logic>
> >
> > <esql:execute-query>
> >
> > <esql:query>select
> > * from chapter where ChapID=<xsp:expr>chapter</xsp:expr>
> >
> > </esql:query>
> >
> > <esql:results>
> >
> > <esql:row-results>
> >
> > <ChapTitle>
> >
> > <esql:get-string
> > column="ChapTitle"/>
> >
> > </ChapTitle>
> >
> > <ChapContent>
> >
> > <esql:get-string
> > column="ChapContent"/>
> >
> > </ChapContent>
> >
> > <Paragraph>
> >
> > <esql:execute-query>
> >
> > <esql:query>select
> > ParaID from parabuild where BuildChapID=<xsp:expr>chapter</xsp:expr> order
> > by ParaOrdine</esql:query>
> >
> > <esql:results>
> >
> >
> <esql:row-results>
> >
> >
> <xsp:logic>
> >
> > String
> > paragraph = <esql:get-string column="ParaID"/>;
> >
> > </xsp:logic>
> >
> >
> <esql:execute-query>
> >
> >
> <esql:query>select
> > * from paragraph where ParaID=<xsp:expr>paragraph</xsp:expr>
> >
> >
> </esql:query>
> >
> >
> <esql:results>
> >
> >
> <esql:row-results>
> >
> >
> <ParaTitle>
> >
> >
> <esql:get-string
> > column="ParaTitle"/>
> >
> >
> </ParaTitle>
> >
> >
> <ParaContent>
> >
> >
> <esql:get-string
> > column="ParaContent"/>
> >
> >
> </ParaContent>
> >
> >
> </esql:row-results>
> >
> >
> </esql:results>
> >
> >
> </esql:execute-query>
> >
> >
> </esql:row-results>
> >
> > </esql:results>
> >
> > </esql:execute-query>
> >
> > </Paragraph>
> >
> > </esql:row-results>
> >
> > </esql:results>
> >
> > </esql:execute-query>
> >
> > </esql:row-results>
> >
> > </esql:results>
> >
> > </esql:execute-query>
> >
> </Chapter>
> >
> </esql:row-results>
> >
> </esql:results>
> >
> </esql:execute-query>
> >
> </esql:row-results>
> >
> </esql:results>
> >
> </esql:execute-query>
> > </Section>
> > </esql:row-results>
> > </esql:results>
> > </esql:execute-query>
> > </esql:connection>
> > </Document>
> > </xsp:page>
> >
> >
> > >myfile.xsl:
> > <?xml version="1.0" encoding="UTF-8"?>
> > <xsl:stylesheet version="1.0"
> > xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> > xmlns:xs="http://www.w3.org/2001/XMLSchema">
> > <xsl:template match="/">
> > <html>
> > <head/>
> > <body>
> > <xsl:for-each select="Document">
> > <br/>
> > <xsl:for-each select="DocTitle">
> > <xsl:apply-templates/>
> > </xsl:for-each>
> > <br/>
> > <br/>
> > <xsl:for-each select="DocObj">
> > <xsl:apply-templates/>
> > </xsl:for-each>
> > <br/>
> > <xsl:for-each select="DocVer">
> > <xsl:apply-templates/>
> > </xsl:for-each>
> > <br/>
> > <xsl:for-each select="DocAuth">
> > <xsl:apply-templates/>
> > </xsl:for-each>
> > <br/>
> > <br/>
> > <xsl:for-each select="Section">
> > <br/>
> > <xsl:for-each
> > select="SecTitle">
> >
> <xsl:apply-templates/>
> > </xsl:for-each>
> > <br/>
> > <xsl:for-each
> > select="SecContent">
> >
> <xsl:apply-templates/>
> > </xsl:for-each>
> > <br/>
> > <br/>
> > <xsl:for-each
> > select="Chapter">
> > <br/>
> > <xsl:for-each
> > select="ChapTitle">
> >
> <xsl:apply-templates/>
> > </xsl:for-each>
> > <br/>
> > <xsl:for-each
> > select="ChapContent">
> >
> <xsl:apply-templates/>
> > </xsl:for-each>
> > <br/>
> > <br/>
> > <xsl:for-each
> > select="Paragraph">
> > <br/>
> >
> <xsl:for-each
> > select="ParaTitle">
> >
> <xsl:apply-templates/>
> >
> </xsl:for-each>
> > <br/>
> >
> <xsl:for-each
> > select="ParaContent">
> >
> <xsl:apply-templates/>
> >
> </xsl:for-each>
> > <br/>
> > <br/>
> > </xsl:for-each>
> > <br/>
> > </xsl:for-each>
> > <br/>
> > </xsl:for-each>
> > <br/>
> > <br/>
> > </xsl:for-each>
> > </body>
> > </html>
> > </xsl:template>
> > </xsl:stylesheet>
> >
> >
> > ---------------------------------------------------------------------
> > Please check that your question has not already been answered in the
> > FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
> >
> > To unsubscribe, e-mail: <co...@xml.apache.org>
> > For additional commands, e-mail: <co...@xml.apache.org>
> >
>
>
>---------------------------------------------------------------------
>Please check that your question has not already been answered in the
>FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
>
>To unsubscribe, e-mail: <co...@xml.apache.org>
>For additional commands, e-mail: <co...@xml.apache.org>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
RE: Output xsl --- next trap
Posted by Luca Morandini <lu...@tin.it>.
> I hope you wanted the output of the xml file in the browser ....
>
Well, I'd like the "tagged" version of it ("View / Page source" would do)
> Because I work in Italy ?!
Makes sense.
Best regards,
---------------------------------------------
Luca Morandini
GIS Consultant
lmorandini@ieee.org
http://utenti.tripod.it/lmorandini/index.html
---------------------------------------------
> -----Original Message-----
> From: Jessica Niewint [mailto:j.niewint@kiosco.org]
> Sent: Monday, September 30, 2002 10:47 AM
> To: cocoon-users@xml.apache.org
> Subject: RE: Output xsl --- next trap
>
>
> At 20.40 27/09/2002 +0200, you wrote:
> >Jessica,
> >
> >three things:
> >
> >1) could you please post the output of myfile.xml (in other words, the
> >input of myfile.xsl) ?
>
> I hope you wanted the output of the xml file in the browser ....
>
>
> output:
>
> title document 1
>
> dummy content doc 1
> 10
> Author1
>
>
> Section A Section B
> Content of section A Content of section B
>
>
> chapter 3 chapter 2 chapter 1
> content chapter 3 content chapter 2 content chapter 1
>
>
> Paragraph 5 Paragraph 4
> Content of Paragraph 5 Content of Paragraph 4
>
>
> Paragraph 2
> Content of Paragraph 2
>
>
> Paragraph 1 Paragraph 3
> Content of Paragraph 1 Content of Paragraph 3
>
>
>
> chapter 4 chapter 5
> content chapter 4 content chapter 5
>
>
> Paragraph 6
> Content of Paragraph 6
>
>
> Paragraph 7
> Content of Paragraph 7
>
>
>
>
> >2) could you tell me why the output is in Italian ?
>
>
> Because I work in Italy ?!
>
>
> >3) could you use plain text for messages ?
>
> Yes, it was a mistake (I was too quick with my mouse click ;-)).
> Sorry again
>
>
> >Best regards,
> >
> >---------------------------------------------
> > Luca Morandini
> > GIS Consultant
> > lmorandini@ieee.org
> >http://utenti.tripod.it/lmorandini/index.html
>
>
>
>
> >HI it's me again.
> >
> >With this xml file I get the right chapters for the right sections and the
> >right sections for the right document.
> >Only that my output is something like this
> >document
> >section A section B
> >chapter 1 chapter 2
> >chapter 3
> >
> >
> >I wanted to generate a document structure like this:
> >document
> >section A
> >chapter 1
> >chapter 2
> >section B
> >chapter 3
> >
> >
> >
> >I have no idea if my way how to use the esql -query is wrong or if I have
> >change the xsl file.
> >
> >But may some one just give me a hint ...
> >
> >Thank you in advance ...
> >J.
> >
> >I will post again my xml and my xsl file. Sorry for this long posting.
> <?xml version="1.0" encoding="UTF-8"?>
> <xsp:page laguage="java" xmlns:xsp="http://apache.org/xsp"
> xmlns:esql="http://apache.org/cocoon/SQL/v2">
> <!-- Get Document -->
> <Document xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:noNamespaceSchemaLocation="schema.xsd"
> xmlns:esql="http://apache.org/cocoon/SQL/v2" xmlns:xsp="http://apache.org/xsp">
> <esql:connection>
> <esql:pool>xmldb</esql:pool>
> <xsp:logic> String document= "1";</xsp:logic>
> <esql:execute-query>
> <esql:query>select * from document where
> DocID=<xsp:expr>document</xsp:expr>
> </esql:query>
> <esql:results>
> <esql:row-results>
> <DocObj>
> <esql:get-string
> column="DocObject"/>
> </DocObj>
> <DocTitle>
> <esql:get-string
> column="DocTitle"/>
> </DocTitle>
> <DocVer>
> <esql:get-string
> column="DocVersion"/>
> </DocVer>
> <DocAuth>
> <esql:get-string
> column="DocAuthor"/>
> </DocAuth>
> <DocDate>
> <esql:get-date
> column="DocData"/>
> </DocDate>
> <!-- Get Sections-->
> <Section>
> <esql:execute-query>
> <esql:query>select
> BuildSecID, SecID from secbuild where DocID=<xsp:expr>document</xsp:expr>
> order by SecOrdine</esql:query>
> <esql:results>
> <esql:row-results>
> <xsp:logic>
> String
> buildSecID = <esql:get-string column="BuildSecID"/>;
> String
> section = <esql:get-string column="SecID"/>;
> </xsp:logic>
> <esql:execute-query>
> <esql:query>select
> * from section where SecID=<xsp:expr>section</xsp:expr>
> </esql:query>
> <esql:results>
> <esql:row-results>
> <SecTitle>
> <esql:get-string
> column="SecTitle"/>
> </SecTitle>
> <SecContent>
> <esql:get-string
> column="SecContent"/>
> </SecContent>
> <!--
> Get Chapter -->
> <Chapter>
>
> <esql:execute-query>
>
> <esql:query>select
> BuildChapID, ChapID from chapbuild where
> BuildSecID=<xsp:expr>buildSecID</xsp:expr> order by ChapOrdine</esql:query>
>
> <esql:results>
>
> <esql:row-results>
>
> <xsp:logic>
> String
> buildchapID = <esql:get-string column="BuildChapID"/>;
> String
> chapter = <esql:get-string column="ChapID"/>;
> </xsp:logic>
>
> <esql:execute-query>
>
> <esql:query>select
> * from chapter where ChapID=<xsp:expr>chapter</xsp:expr>
>
> </esql:query>
>
> <esql:results>
>
> <esql:row-results>
>
> <ChapTitle>
>
> <esql:get-string
> column="ChapTitle"/>
>
> </ChapTitle>
>
> <ChapContent>
>
> <esql:get-string
> column="ChapContent"/>
>
> </ChapContent>
>
> <Paragraph>
>
> <esql:execute-query>
>
> <esql:query>select
> ParaID from parabuild where BuildChapID=<xsp:expr>chapter</xsp:expr> order
> by ParaOrdine</esql:query>
>
> <esql:results>
>
> <esql:row-results>
>
> <xsp:logic>
>
> String
> paragraph = <esql:get-string column="ParaID"/>;
>
> </xsp:logic>
>
> <esql:execute-query>
>
> <esql:query>select
> * from paragraph where ParaID=<xsp:expr>paragraph</xsp:expr>
>
> </esql:query>
>
> <esql:results>
>
> <esql:row-results>
>
> <ParaTitle>
>
> <esql:get-string
> column="ParaTitle"/>
>
> </ParaTitle>
>
> <ParaContent>
>
> <esql:get-string
> column="ParaContent"/>
>
> </ParaContent>
>
> </esql:row-results>
>
> </esql:results>
>
> </esql:execute-query>
>
> </esql:row-results>
>
> </esql:results>
>
> </esql:execute-query>
>
> </Paragraph>
>
> </esql:row-results>
>
> </esql:results>
>
> </esql:execute-query>
>
> </esql:row-results>
>
> </esql:results>
>
> </esql:execute-query>
> </Chapter>
> </esql:row-results>
> </esql:results>
> </esql:execute-query>
> </esql:row-results>
> </esql:results>
> </esql:execute-query>
> </Section>
> </esql:row-results>
> </esql:results>
> </esql:execute-query>
> </esql:connection>
> </Document>
> </xsp:page>
>
>
> >myfile.xsl:
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns:xs="http://www.w3.org/2001/XMLSchema">
> <xsl:template match="/">
> <html>
> <head/>
> <body>
> <xsl:for-each select="Document">
> <br/>
> <xsl:for-each select="DocTitle">
> <xsl:apply-templates/>
> </xsl:for-each>
> <br/>
> <br/>
> <xsl:for-each select="DocObj">
> <xsl:apply-templates/>
> </xsl:for-each>
> <br/>
> <xsl:for-each select="DocVer">
> <xsl:apply-templates/>
> </xsl:for-each>
> <br/>
> <xsl:for-each select="DocAuth">
> <xsl:apply-templates/>
> </xsl:for-each>
> <br/>
> <br/>
> <xsl:for-each select="Section">
> <br/>
> <xsl:for-each
> select="SecTitle">
> <xsl:apply-templates/>
> </xsl:for-each>
> <br/>
> <xsl:for-each
> select="SecContent">
> <xsl:apply-templates/>
> </xsl:for-each>
> <br/>
> <br/>
> <xsl:for-each
> select="Chapter">
> <br/>
> <xsl:for-each
> select="ChapTitle">
> <xsl:apply-templates/>
> </xsl:for-each>
> <br/>
> <xsl:for-each
> select="ChapContent">
> <xsl:apply-templates/>
> </xsl:for-each>
> <br/>
> <br/>
> <xsl:for-each
> select="Paragraph">
> <br/>
> <xsl:for-each
> select="ParaTitle">
> <xsl:apply-templates/>
> </xsl:for-each>
> <br/>
> <xsl:for-each
> select="ParaContent">
> <xsl:apply-templates/>
> </xsl:for-each>
> <br/>
> <br/>
> </xsl:for-each>
> <br/>
> </xsl:for-each>
> <br/>
> </xsl:for-each>
> <br/>
> <br/>
> </xsl:for-each>
> </body>
> </html>
> </xsl:template>
> </xsl:stylesheet>
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
RE: Output xsl --- next trap
Posted by Jessica Niewint <j....@kiosco.org>.
At 20.40 27/09/2002 +0200, you wrote:
>Jessica,
>
>three things:
>
>1) could you please post the output of myfile.xml (in other words, the
>input of myfile.xsl) ?
I hope you wanted the output of the xml file in the browser ....
output:
title document 1
dummy content doc 1
10
Author1
Section A Section B
Content of section A Content of section B
chapter 3 chapter 2 chapter 1
content chapter 3 content chapter 2 content chapter 1
Paragraph 5 Paragraph 4
Content of Paragraph 5 Content of Paragraph 4
Paragraph 2
Content of Paragraph 2
Paragraph 1 Paragraph 3
Content of Paragraph 1 Content of Paragraph 3
chapter 4 chapter 5
content chapter 4 content chapter 5
Paragraph 6
Content of Paragraph 6
Paragraph 7
Content of Paragraph 7
>2) could you tell me why the output is in Italian ?
Because I work in Italy ?!
>3) could you use plain text for messages ?
Yes, it was a mistake (I was too quick with my mouse click ;-)).
Sorry again
>Best regards,
>
>---------------------------------------------
> Luca Morandini
> GIS Consultant
> lmorandini@ieee.org
>http://utenti.tripod.it/lmorandini/index.html
>HI it's me again.
>
>With this xml file I get the right chapters for the right sections and the
>right sections for the right document.
>Only that my output is something like this
>document
>section A section B
>chapter 1 chapter 2
>chapter 3
>
>
>I wanted to generate a document structure like this:
>document
>section A
>chapter 1
>chapter 2
>section B
>chapter 3
>
>
>
>I have no idea if my way how to use the esql -query is wrong or if I have
>change the xsl file.
>
>But may some one just give me a hint ...
>
>Thank you in advance ...
>J.
>
>I will post again my xml and my xsl file. Sorry for this long posting.
<?xml version="1.0" encoding="UTF-8"?>
<xsp:page laguage="java" xmlns:xsp="http://apache.org/xsp"
xmlns:esql="http://apache.org/cocoon/SQL/v2">
<!-- Get Document -->
<Document xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="schema.xsd"
xmlns:esql="http://apache.org/cocoon/SQL/v2" xmlns:xsp="http://apache.org/xsp">
<esql:connection>
<esql:pool>xmldb</esql:pool>
<xsp:logic> String document= "1";</xsp:logic>
<esql:execute-query>
<esql:query>select * from document where
DocID=<xsp:expr>document</xsp:expr>
</esql:query>
<esql:results>
<esql:row-results>
<DocObj>
<esql:get-string
column="DocObject"/>
</DocObj>
<DocTitle>
<esql:get-string
column="DocTitle"/>
</DocTitle>
<DocVer>
<esql:get-string
column="DocVersion"/>
</DocVer>
<DocAuth>
<esql:get-string
column="DocAuthor"/>
</DocAuth>
<DocDate>
<esql:get-date
column="DocData"/>
</DocDate>
<!-- Get Sections-->
<Section>
<esql:execute-query>
<esql:query>select
BuildSecID, SecID from secbuild where DocID=<xsp:expr>document</xsp:expr>
order by SecOrdine</esql:query>
<esql:results>
<esql:row-results>
<xsp:logic>
String
buildSecID = <esql:get-string column="BuildSecID"/>;
String
section = <esql:get-string column="SecID"/>;
</xsp:logic>
<esql:execute-query>
<esql:query>select
* from section where SecID=<xsp:expr>section</xsp:expr>
</esql:query>
<esql:results>
<esql:row-results>
<SecTitle>
<esql:get-string
column="SecTitle"/>
</SecTitle>
<SecContent>
<esql:get-string
column="SecContent"/>
</SecContent>
<!--
Get Chapter -->
<Chapter>
<esql:execute-query>
<esql:query>select
BuildChapID, ChapID from chapbuild where
BuildSecID=<xsp:expr>buildSecID</xsp:expr> order by ChapOrdine</esql:query>
<esql:results>
<esql:row-results>
<xsp:logic>
String
buildchapID = <esql:get-string column="BuildChapID"/>;
String
chapter = <esql:get-string column="ChapID"/>;
</xsp:logic>
<esql:execute-query>
<esql:query>select
* from chapter where ChapID=<xsp:expr>chapter</xsp:expr>
</esql:query>
<esql:results>
<esql:row-results>
<ChapTitle>
<esql:get-string
column="ChapTitle"/>
</ChapTitle>
<ChapContent>
<esql:get-string
column="ChapContent"/>
</ChapContent>
<Paragraph>
<esql:execute-query>
<esql:query>select
ParaID from parabuild where BuildChapID=<xsp:expr>chapter</xsp:expr> order
by ParaOrdine</esql:query>
<esql:results>
<esql:row-results>
<xsp:logic>
String
paragraph = <esql:get-string column="ParaID"/>;
</xsp:logic>
<esql:execute-query>
<esql:query>select
* from paragraph where ParaID=<xsp:expr>paragraph</xsp:expr>
</esql:query>
<esql:results>
<esql:row-results>
<ParaTitle>
<esql:get-string
column="ParaTitle"/>
</ParaTitle>
<ParaContent>
<esql:get-string
column="ParaContent"/>
</ParaContent>
</esql:row-results>
</esql:results>
</esql:execute-query>
</esql:row-results>
</esql:results>
</esql:execute-query>
</Paragraph>
</esql:row-results>
</esql:results>
</esql:execute-query>
</esql:row-results>
</esql:results>
</esql:execute-query>
</Chapter>
</esql:row-results>
</esql:results>
</esql:execute-query>
</esql:row-results>
</esql:results>
</esql:execute-query>
</Section>
</esql:row-results>
</esql:results>
</esql:execute-query>
</esql:connection>
</Document>
</xsp:page>
>myfile.xsl:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xsl:template match="/">
<html>
<head/>
<body>
<xsl:for-each select="Document">
<br/>
<xsl:for-each select="DocTitle">
<xsl:apply-templates/>
</xsl:for-each>
<br/>
<br/>
<xsl:for-each select="DocObj">
<xsl:apply-templates/>
</xsl:for-each>
<br/>
<xsl:for-each select="DocVer">
<xsl:apply-templates/>
</xsl:for-each>
<br/>
<xsl:for-each select="DocAuth">
<xsl:apply-templates/>
</xsl:for-each>
<br/>
<br/>
<xsl:for-each select="Section">
<br/>
<xsl:for-each
select="SecTitle">
<xsl:apply-templates/>
</xsl:for-each>
<br/>
<xsl:for-each
select="SecContent">
<xsl:apply-templates/>
</xsl:for-each>
<br/>
<br/>
<xsl:for-each
select="Chapter">
<br/>
<xsl:for-each
select="ChapTitle">
<xsl:apply-templates/>
</xsl:for-each>
<br/>
<xsl:for-each
select="ChapContent">
<xsl:apply-templates/>
</xsl:for-each>
<br/>
<br/>
<xsl:for-each
select="Paragraph">
<br/>
<xsl:for-each
select="ParaTitle">
<xsl:apply-templates/>
</xsl:for-each>
<br/>
<xsl:for-each
select="ParaContent">
<xsl:apply-templates/>
</xsl:for-each>
<br/>
<br/>
</xsl:for-each>
<br/>
</xsl:for-each>
<br/>
</xsl:for-each>
<br/>
<br/>
</xsl:for-each>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
RE: Output xsl --- next trap
Posted by Luca Morandini <lu...@tin.it>.
Jessica,
three things:
1) could you please post the output of myfile.xml (in other words, the input of myfile.xsl) ?
2) could you tell me why the output is in Italian ?
3) could you use plain text for messages ?
Best regards,
---------------------------------------------
Luca Morandini
GIS Consultant
lmorandini@ieee.org
http://utenti.tripod.it/lmorandini/index.html
---------------------------------------------
-----Original Message-----
From: Jessica Niewint [mailto:j.niewint@kiosco.org]
Sent: Friday, September 27, 2002 5:03 PM
To: cocoon-users@xml.apache.org
Subject: Output xsl --- next trap
HI it's me again.
With this xml file I get the right chapters for the right sections and the right sections for the right document.
Only that my output is something like this
document
section A section B
chapter 1 chapter 2
chapter 3
I wanted to generate a document structure like this:
document
section A
chapter 1
chapter 2
section B
chapter 3
I have no idea if my way how to use the esql -query is wrong or if I have change the xsl file.
But may some one just give me a hint ...
Thank you in advance ...
J.
I will post again my xml and my xsl file. Sorry for this long posting.
myfile.xml
<?xml version="1.0" encoding="UTF-8"?>
<xsp:page laguage="java" xmlns:xsp="http://apache.org/xsp" xmlns:esql="http://apache.org/cocoon/SQL/v2">
<!-- Get Document -->
<Document xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="schema.xsd"
xmlns:esql="http://apache.org/cocoon/SQL/v2" xmlns:xsp="http://apache.org/xsp">
<esql:connection>
<esql:pool>xmldb</esql:pool>
<xsp:logic> String document= "1";</xsp:logic>
<esql:execute-query>
<esql:query>select * from document where DocID=<xsp:expr>document</xsp:expr>
</esql:query>
<esql:results>
<esql:row-results>
<DocObj>
<esql:get-string column="DocObject"/>
</DocObj>
<DocTitle>
<esql:get-string column="DocTitle"/>
</DocTitle>
<DocVer>
<esql:get-string column="DocVersion"/>
</DocVer>
<!-- Get Sections-->
<Section>
<esql:execute-query>
<esql:query>select * from section where
SecID=<xsp:expr>section</xsp:expr></esql:query>
<esql:results>
<esql:row-results>
<SecTitle>
<esql:get-string
column="SecTitle"/>
</SecTitle>
<SecContent>
<esql:get-string
column="SecContent"/>
</SecContent>
<!-- Get Chapter for every selected Section -->
<Chapter>
<esql:execute-query>
<esql:query>select * from chapter where ChapID=<xsp:expr>chapter</xsp:expr> AND Section=<xsp:expr>section</xsp:expr></esql:query>
<esql:results>
<esql:row-results>
<ChapTitle>
<esql:get-string column="ChapTitle"/>
</ChapTitle>
<ChapContent>
<esql:get-string column="ChapContent"/>
</ChapContent>
</esql:row-results>
</esql:results>
</esql:execute-query>
</Chapter>
</esql:row-results>
</esql:results>
</esql:execute-query>
</Section>
</esql:row-results>
</esql:results>
</esql:execute-query>
</esql:connection>
</Document>
</xsp:page>
myfile.xsl:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<xsl:template match="/">
<html>
<head/>
<body>
<xsl:for-each select="Document">
<br/>Titolo: <xsl:for-each select="DocTitle">
<xsl:apply-templates/>
</xsl:for-each>
<br/>Oggetto: <xsl:for-each select="DocObj">
<xsl:apply-templates/>
</xsl:for-each>
<br/>Versione:<xsl:for-each select="DocVer">
<xsl:apply-templates/>
</xsl:for-each>
<br/>
<!-- Output Section -->
<br/> <xsl:for-each select="Section">
<br/>Sezione:<br/>Titolo: <xsl:for-each select="SecTitle">
<xsl:apply-templates/>
</xsl:for-each>
<br/>Commento: <xsl:for-each select="SecContent">
<xsl:apply-templates/>
</xsl:for-each>
<br/>
<br/>
<!-- Output Chapter -->
<xsl:for-each select="Chapter">
<br/>Capitolo:<br/>Titolo: <xsl:for-each select="ChapTitle">
<xsl:apply-templates/>
</xsl:for-each>
<br/>Commento:<xsl:for-each select="ChapContent">
<xsl:apply-templates/>
</xsl:for-each>
<br/>
<br/>
</xsl:for-each>
<br/>
</xsl:for-each>
<br/>
<br/>
</xsl:for-each>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>