You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Johannes Franz <jo...@rub.de> on 2004/09/24 11:06:06 UTC
Question concerning Xalan.
Hi there,
i don't know where to ask questions concerning Xalan, i didn't find a mailing
list at http://xml.apache.org/xalan-j/.
Perhaps you can help me:
I have a really big xml-file from which i would like to create many little
html files. So is this possible to use a big xml-file and a stylesheet in
order to create a new html file everytime the Tag <html> occurs?
Greetings,
Johannes.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
Re: Question concerning Xalan.
Posted by Jeremias Maerki <de...@greenmail.ch>.
Sorry for the trouble. I was mixing languages. Oh, why do we have so may
of them in IT? :-(
On 14.10.2004 19:18:08 Johannes Franz wrote:
> <redirect:write select="'foo' &position() &'.html'">
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
RE: Question concerning Xalan.
Posted by "Andreas L. Delmelle" <a_...@pandora.be>.
Yep, that would be because '+' is only meant for numeric addition. Since two
of the operands are not numbers, you get NaN (IIC, short for Not a
Number...)
Cheers,
Andreas
> -----Original Message-----
> From: Johannes Franz [mailto:johannes.franz@rub.de]
> Sent: donderdag 14 oktober 2004 19:42
> To: fop-user@xml.apache.org
> Subject: Re: Question concerning Xalan.
>
>
> Hi Clay,
> when i try your way i don't get error messages. But only one file
> is created
> with the name NaN.
> ----- Original Message -----
> From: "Clay Leeds" <cl...@medata.com>
> To: <fo...@xml.apache.org>
> Sent: Thursday, October 14, 2004 7:34 PM
> Subject: Re: Question concerning Xalan.
>
>
> > On Oct 14, 2004, at 10:18 AM, Johannes Franz wrote:
> >> Sorry but i am really a newbie:
> >> When i try your example i get the following error message:
> >>
> >> <xsl:template match="/doc/foo">
> >> <redirect:write select="'foo' &position() &'.html'">
> >
> > I think that should be:
> >
> > <redirect:write select="'foo' + position() + '.html'">
> >
> >> <foo-out>
> >> <xsl:apply-templates/>
> >> </foo-out>
> >> </redirect:write>
> >> </xsl:template>
> >>
> >> java -cp xalan-2.4.1.jar;xerces-1.2.3.jar
> >> org.apache.xalan.xslt.Process -IN Redirect.xml -XSL Redirect.xsl -OUT
> >> Redirect.html -HTML
> >> [Fatal Error] Redirect.xsl:20:44: The reference to entity
> "position" must
> >> end with the ';' delimiter.
> >>
> >> Redirect.xsl; Line #20; Column #44; XSLT Error
> >> (javax.xml.transform.TransformerConfigurationException):
> >> javax.xml.transform.TransformerException:
> org.xml.sax.SAXParseException:
> >> The reference to entity "position" must end with the ';' delimiter.
> >>
> >>
> >> ----- Original Message ----- From: "Jeremias Maerki"
> >> <de...@greenmail.ch>
> >> To: <fo...@xml.apache.org>
> >> Sent: Thursday, October 14, 2004 6:00 PM
> >> Subject: Re: Question concerning Xalan.
> >>
> >>
> >>> Something like that maybe?
> >>>
> >>> <xsl:template match="/doc/foo">
> >>> <redirect:write select="'foo' & position() & '.html'">
> >>> <foo-out>
> >>> <xsl:apply-templates/>
> >>> </foo-out>
> >>> </redirect:write>
> >>> </xsl:template>
> >>>
> >>> On 14.10.2004 17:18:25 Johannes Franz wrote:
> >>>> Hi,
> >>>>
> >>>> yeah this is exactly what i needed. But could you please
> help me with
> >>>> the
> >>>> following problem?
> >>>> I would like to write to write every childnote to a new
> file. If there
> >>>> are 4
> >>>> Childnodes doc/foo
> >>>> he should write every childnote to one file: foo1.html foo2.html
> >>>> foo3.html
> >>>> foo4.html. Could someone give me example how to realize this?
> >>>>
> >>>> <xsl:template match="/doc/foo">
> >>>> <redirect:write select="@file">
> >>>> <foo-out>
> >>>> <xsl:apply-templates/>
> >>>> </foo-out>
> >>>> </redirect:write>
> >>>> </xsl:template>
> >>>
> >>>
> >>> Jeremias Maerki
> >>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
> >>> For additional commands, e-mail: fop-user-help@xml.apache.org
> >>>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
> >> For additional commands, e-mail: fop-user-help@xml.apache.org
> >>
> >>
> > Web Maestro Clay
> > --
> > Clay Leeds - <cl...@medata.com>
> > Webmaster/Developer - Medata, Inc. - <http://www.medata.com/>
> > PGP Public Key: <https://mail.medata.com/pgp/cleeds.asc>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
> > For additional commands, e-mail: fop-user-help@xml.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: fop-user-help@xml.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
Re: Question concerning Xalan.
Posted by Johannes Franz <jo...@rub.de>.
Hi Clay,
when i try your way i don't get error messages. But only one file is created
with the name NaN.
----- Original Message -----
From: "Clay Leeds" <cl...@medata.com>
To: <fo...@xml.apache.org>
Sent: Thursday, October 14, 2004 7:34 PM
Subject: Re: Question concerning Xalan.
> On Oct 14, 2004, at 10:18 AM, Johannes Franz wrote:
>> Sorry but i am really a newbie:
>> When i try your example i get the following error message:
>>
>> <xsl:template match="/doc/foo">
>> <redirect:write select="'foo' &position() &'.html'">
>
> I think that should be:
>
> <redirect:write select="'foo' + position() + '.html'">
>
>> <foo-out>
>> <xsl:apply-templates/>
>> </foo-out>
>> </redirect:write>
>> </xsl:template>
>>
>> java -cp xalan-2.4.1.jar;xerces-1.2.3.jar
>> org.apache.xalan.xslt.Process -IN Redirect.xml -XSL Redirect.xsl -OUT
>> Redirect.html -HTML
>> [Fatal Error] Redirect.xsl:20:44: The reference to entity "position" must
>> end with the ';' delimiter.
>>
>> Redirect.xsl; Line #20; Column #44; XSLT Error
>> (javax.xml.transform.TransformerConfigurationException):
>> javax.xml.transform.TransformerException: org.xml.sax.SAXParseException:
>> The reference to entity "position" must end with the ';' delimiter.
>>
>>
>> ----- Original Message ----- From: "Jeremias Maerki"
>> <de...@greenmail.ch>
>> To: <fo...@xml.apache.org>
>> Sent: Thursday, October 14, 2004 6:00 PM
>> Subject: Re: Question concerning Xalan.
>>
>>
>>> Something like that maybe?
>>>
>>> <xsl:template match="/doc/foo">
>>> <redirect:write select="'foo' & position() & '.html'">
>>> <foo-out>
>>> <xsl:apply-templates/>
>>> </foo-out>
>>> </redirect:write>
>>> </xsl:template>
>>>
>>> On 14.10.2004 17:18:25 Johannes Franz wrote:
>>>> Hi,
>>>>
>>>> yeah this is exactly what i needed. But could you please help me with
>>>> the
>>>> following problem?
>>>> I would like to write to write every childnote to a new file. If there
>>>> are 4
>>>> Childnodes doc/foo
>>>> he should write every childnote to one file: foo1.html foo2.html
>>>> foo3.html
>>>> foo4.html. Could someone give me example how to realize this?
>>>>
>>>> <xsl:template match="/doc/foo">
>>>> <redirect:write select="@file">
>>>> <foo-out>
>>>> <xsl:apply-templates/>
>>>> </foo-out>
>>>> </redirect:write>
>>>> </xsl:template>
>>>
>>>
>>> Jeremias Maerki
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
>>> For additional commands, e-mail: fop-user-help@xml.apache.org
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
>> For additional commands, e-mail: fop-user-help@xml.apache.org
>>
>>
> Web Maestro Clay
> --
> Clay Leeds - <cl...@medata.com>
> Webmaster/Developer - Medata, Inc. - <http://www.medata.com/>
> PGP Public Key: <https://mail.medata.com/pgp/cleeds.asc>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: fop-user-help@xml.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
Re: Question concerning Xalan.
Posted by Clay Leeds <cl...@medata.com>.
On Oct 14, 2004, at 10:18 AM, Johannes Franz wrote:
> Sorry but i am really a newbie:
> When i try your example i get the following error message:
>
> <xsl:template match="/doc/foo">
> <redirect:write select="'foo' &position() &'.html'">
I think that should be:
<redirect:write select="'foo' + position() + '.html'">
> <foo-out>
> <xsl:apply-templates/>
> </foo-out>
> </redirect:write>
> </xsl:template>
>
> java -cp xalan-2.4.1.jar;xerces-1.2.3.jar
> org.apache.xalan.xslt.Process -IN Redirect.xml -XSL Redirect.xsl -OUT
> Redirect.html -HTML
> [Fatal Error] Redirect.xsl:20:44: The reference to entity "position"
> must end with the ';' delimiter.
>
> Redirect.xsl; Line #20; Column #44; XSLT Error
> (javax.xml.transform.TransformerConfigurationException):
> javax.xml.transform.TransformerException:
> org.xml.sax.SAXParseException: The reference to entity "position" must
> end with the ';' delimiter.
>
>
> ----- Original Message ----- From: "Jeremias Maerki"
> <de...@greenmail.ch>
> To: <fo...@xml.apache.org>
> Sent: Thursday, October 14, 2004 6:00 PM
> Subject: Re: Question concerning Xalan.
>
>
>> Something like that maybe?
>>
>> <xsl:template match="/doc/foo">
>> <redirect:write select="'foo' & position() & '.html'">
>> <foo-out>
>> <xsl:apply-templates/>
>> </foo-out>
>> </redirect:write>
>> </xsl:template>
>>
>> On 14.10.2004 17:18:25 Johannes Franz wrote:
>>> Hi,
>>>
>>> yeah this is exactly what i needed. But could you please help me
>>> with the
>>> following problem?
>>> I would like to write to write every childnote to a new file. If
>>> there are 4
>>> Childnodes doc/foo
>>> he should write every childnote to one file: foo1.html foo2.html
>>> foo3.html
>>> foo4.html. Could someone give me example how to realize this?
>>>
>>> <xsl:template match="/doc/foo">
>>> <redirect:write select="@file">
>>> <foo-out>
>>> <xsl:apply-templates/>
>>> </foo-out>
>>> </redirect:write>
>>> </xsl:template>
>>
>>
>> Jeremias Maerki
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
>> For additional commands, e-mail: fop-user-help@xml.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: fop-user-help@xml.apache.org
>
>
Web Maestro Clay
--
Clay Leeds - <cl...@medata.com>
Webmaster/Developer - Medata, Inc. - <http://www.medata.com/>
PGP Public Key: <https://mail.medata.com/pgp/cleeds.asc>
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
Re: Question concerning Xalan.
Posted by Johannes Franz <jo...@rub.de>.
Perhaps a good page with examples of the xslt functions like posiotion could
help me.
----- Original Message -----
From: "Johannes Franz" <jo...@rub.de>
To: <fo...@xml.apache.org>
Sent: Thursday, October 14, 2004 7:18 PM
Subject: Re: Question concerning Xalan.
> Sorry but i am really a newbie:
> When i try your example i get the following error message:
>
>
> <xsl:template match="/doc/foo">
> <redirect:write select="'foo' &position() &'.html'">
> <foo-out>
> <xsl:apply-templates/>
> </foo-out>
> </redirect:write>
> </xsl:template>
>
> java -cp xalan-2.4.1.jar;xerces-1.2.3.jar
> org.apache.xalan.xslt.Process -IN Redirect.xml -XSL Redirect.xsl -OUT
> Redirect.html -HTML
> [Fatal Error] Redirect.xsl:20:44: The reference to entity "position" must
> end with the ';' delimiter.
>
> Redirect.xsl; Line #20; Column #44; XSLT Error
> (javax.xml.transform.TransformerConfigurationException):
> javax.xml.transform.TransformerException: org.xml.sax.SAXParseException:
> The reference to entity "position" must end with the ';' delimiter.
>
>
> ----- Original Message -----
> From: "Jeremias Maerki" <de...@greenmail.ch>
> To: <fo...@xml.apache.org>
> Sent: Thursday, October 14, 2004 6:00 PM
> Subject: Re: Question concerning Xalan.
>
>
>> Something like that maybe?
>>
>> <xsl:template match="/doc/foo">
>> <redirect:write select="'foo' & position() & '.html'">
>> <foo-out>
>> <xsl:apply-templates/>
>> </foo-out>
>> </redirect:write>
>> </xsl:template>
>>
>> On 14.10.2004 17:18:25 Johannes Franz wrote:
>>> Hi,
>>>
>>> yeah this is exactly what i needed. But could you please help me with
>>> the
>>> following problem?
>>> I would like to write to write every childnote to a new file. If there
>>> are 4
>>> Childnodes doc/foo
>>> he should write every childnote to one file: foo1.html foo2.html
>>> foo3.html
>>> foo4.html. Could someone give me example how to realize this?
>>>
>>> <xsl:template match="/doc/foo">
>>> <redirect:write select="@file">
>>> <foo-out>
>>> <xsl:apply-templates/>
>>> </foo-out>
>>> </redirect:write>
>>> </xsl:template>
>>
>>
>> Jeremias Maerki
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
>> For additional commands, e-mail: fop-user-help@xml.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: fop-user-help@xml.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
Re: Question concerning Xalan.
Posted by Johannes Franz <jo...@rub.de>.
Hi,
in my example file i was using <xsl:template match="/doc/foo">.
In my real file i am using <xsl:for-each
select="tcg-te:Protocolbody/tcg-te:Test_report_list/tcg-te:Test_report"> and
the position is not multiplicated with two. Don't know where the problem
was, but now i doesn't occur.
Thanks for the really good help,
Johannes.
----- Original Message -----
From: "Andreas L. Delmelle" <a_...@pandora.be>
To: <fo...@xml.apache.org>
Sent: Thursday, October 14, 2004 8:05 PM
Subject: RE: Question concerning Xalan.
>> -----Original Message-----
>> From: Andreas L. Delmelle [mailto:a_l.delmelle@pandora.be]
>> > -----Original Message-----
>> > From: Johannes Franz [mailto:johannes.franz@rub.de]
> <snip />
>> > One last problem still remains. The position seems to be
>> > multiplicated with two.
>> > I mean the name of the files is foo2.html foo4.html and so on. Thats
>> > not very terrible, but perhaps there is a way to devide
>> > position by 2. :)
>> >
>> ... Any reason why the processed node's position in the
>> node-set is always double of what you would expect?
>>
>
> Come to think of it: are you maybe using
>
> <xsl:apply-templates select="node()" />
>
> ?
>
> This would also make position take into account possible text nodes in
> between the '/doc/foo' elements.
>
> In that case, better use:
> <xsl:apply-templates select="*" />
>
> Or, a maybe even a little more efficient:
> <xsl:apply-templates select="/doc/foo"
>
> Cheers,
>
> Andreas
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: fop-user-help@xml.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
RE: Question concerning Xalan.
Posted by "Andreas L. Delmelle" <a_...@pandora.be>.
> -----Original Message-----
> From: Andreas L. Delmelle [mailto:a_l.delmelle@pandora.be]
> > -----Original Message-----
> > From: Johannes Franz [mailto:johannes.franz@rub.de]
<snip />
> > One last problem still remains. The position seems to be
> > multiplicated with two.
> > I mean the name of the files is foo2.html foo4.html and so on. Thats
> > not very terrible, but perhaps there is a way to devide
> > position by 2. :)
> >
> ... Any reason why the processed node's position in the
> node-set is always double of what you would expect?
>
Come to think of it: are you maybe using
<xsl:apply-templates select="node()" />
?
This would also make position take into account possible text nodes in
between the '/doc/foo' elements.
In that case, better use:
<xsl:apply-templates select="*" />
Or, a maybe even a little more efficient:
<xsl:apply-templates select="/doc/foo"
Cheers,
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
RE: Question concerning Xalan.
Posted by "Andreas L. Delmelle" <a_...@pandora.be>.
> -----Original Message-----
> From: Johannes Franz [mailto:johannes.franz@rub.de]
>
> Thanks.
> Your version provided the right way. Do you know a page with examples for
> the xslt functions? So that i don't have to strain this list all
> the time.
> :)
>
Check: http://www.dpawson.co.uk/xsl/sect2/sect21.html
Examples organised by theme. Lots and lots of them... :)
> One last problem still remains. The position seems to be
> multiplicated with two.
> I mean the name of the files is foo2.html foo4.html and so on. Thats
> not very terrible, but perhaps there is a way to devide position by 2. :)
>
Sure, if you really know for sure it's always going to be a multiple of 2,
try:
concat('foo',position() div 2,'.html')
But with that result, I can't help but wonder what the XML structure looks
like (as well as your XSL template one level up, where it's applied to the
'/doc/foo' nodes)... Any reason why the processed node's position in the
node-set is always double of what you would expect?
Cheers,
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
Re: Question concerning Xalan.
Posted by Johannes Franz <jo...@rub.de>.
Thanks.
Your version provided the right way. Do you know a page with examples for
the xslt functions? So that i don't have to strain this list all the time.
:)
One last problem still remains. The position seems to be multiplicated with
two. I mean the name of the files is foo2.html foo4.html and so on. Thats
not very terrible, but perhaps there is a way to devide position by 2. :)
----- Original Message -----
From: "Andreas L. Delmelle" <a_...@pandora.be>
To: <fo...@xml.apache.org>
Sent: Thursday, October 14, 2004 7:40 PM
Subject: RE: Question concerning Xalan.
>
> Hi,
>
> Try:
>
> <redirect:write select="concat('foo',position(),'.html')">
>
> ...
>
> Dunno for sure, but could even be that it needs the curly braces for an
> AVT,
> like so:
>
> <redirect:write select="{concat('foo'...)}">
>
>
> One thing's for sure: ampersands definitely can't be used for string
> concatenation in XSLT.
>
>
> Cheers,
>
> Andreas
>
>> -----Original Message-----
>> From: Johannes Franz [mailto:johannes.franz@rub.de]
>> Sent: donderdag 14 oktober 2004 19:18
>> To: fop-user@xml.apache.org
>> Subject: Re: Question concerning Xalan.
>>
>>
>> Sorry but i am really a newbie:
>> When i try your example i get the following error message:
>>
>>
>> <xsl:template match="/doc/foo">
>> <redirect:write select="'foo' &position() &'.html'">
>> <foo-out>
>> <xsl:apply-templates/>
>> </foo-out>
>> </redirect:write>
>> </xsl:template>
>>
>> java -cp xalan-2.4.1.jar;xerces-1.2.3.jar
>> org.apache.xalan.xslt.Process -IN
>> Redirect.xml -XSL Redirect.xsl -OUT Redirect.html -HTML
>> [Fatal Error] Redirect.xsl:20:44: The reference to entity "position" must
>> end with the ';' delimiter.
>>
>> Redirect.xsl; Line #20; Column #44; XSLT Error
>> (javax.xml.transform.TransformerConfigurationException):
>> javax.xml.transform.TransformerException:
>> org.xml.sax.SAXParseException: The
>> reference to entity "position" must end with the ';' delimiter.
>>
>>
>> ----- Original Message -----
>> From: "Jeremias Maerki" <de...@greenmail.ch>
>> To: <fo...@xml.apache.org>
>> Sent: Thursday, October 14, 2004 6:00 PM
>> Subject: Re: Question concerning Xalan.
>>
>>
>> > Something like that maybe?
>> >
>> > <xsl:template match="/doc/foo">
>> > <redirect:write select="'foo' & position() & '.html'">
>> > <foo-out>
>> > <xsl:apply-templates/>
>> > </foo-out>
>> > </redirect:write>
>> > </xsl:template>
>> >
>> > On 14.10.2004 17:18:25 Johannes Franz wrote:
>> >> Hi,
>> >>
>> >> yeah this is exactly what i needed. But could you please help
>> me with the
>> >> following problem?
>> >> I would like to write to write every childnote to a new file. If there
>> >> are 4
>> >> Childnodes doc/foo
>> >> he should write every childnote to one file: foo1.html foo2.html
>> >> foo3.html
>> >> foo4.html. Could someone give me example how to realize this?
>> >>
>> >> <xsl:template match="/doc/foo">
>> >> <redirect:write select="@file">
>> >> <foo-out>
>> >> <xsl:apply-templates/>
>> >> </foo-out>
>> >> </redirect:write>
>> >> </xsl:template>
>> >
>> >
>> > Jeremias Maerki
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
>> > For additional commands, e-mail: fop-user-help@xml.apache.org
>> >
>> >
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
>> For additional commands, e-mail: fop-user-help@xml.apache.org
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: fop-user-help@xml.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
Re: (Welcome Back!) RE: Question concerning Xalan.
Posted by Clay Leeds <cl...@medata.com>.
Hear! Hear! Three cheers for Andreas!
(btw, thanks for correcting my misguided attempt at helping... I 'knew'
it wasn't correct, but I wanted to get the response in there anyway.
Maybe I should've just said this was more of an XSLT question, and
provided a link to[1] and mentioned Dave Pawson's XSL-ent--forgive the
pun!--resource[2]).
Glen couldn't've said it better! "Greetz"
Web Maestro Clay
[1]
http://xml.apache.org/fop/resources.html#documents
[2]
http://www.dpawson.co.uk/xsl/sect3/bk/index.html
On Oct 14, 2004, at 11:40 AM, Glen Mazza wrote:
> Hello Andreas,
>
> Very happy to see you return to the list.
>
> "Greetz,"
> Glen
>
> --- "Andreas L. Delmelle" <a_...@pandora.be>
> wrote:
>
>>
>> Hi,
>>
>> Try:
>>
>> <redirect:write
>> select="concat('foo',position(),'.html')">
>>
>> ...
>>
>> Dunno for sure, but could even be that it needs the
>> curly braces for an AVT,
>> like so:
>>
>> <redirect:write select="{concat('foo'...)}">
>>
>>
>> One thing's for sure: ampersands definitely can't be
>> used for string
>> concatenation in XSLT.
>>
>>
>> Cheers,
>>
>> Andreas
>>
>
>
Web Maestro Clay
--
Clay Leeds - <cl...@medata.com>
Webmaster/Developer - Medata, Inc. - <http://www.medata.com/>
PGP Public Key: <https://mail.medata.com/pgp/cleeds.asc>
(Welcome Back!) RE: Question concerning Xalan.
Posted by Glen Mazza <gr...@yahoo.com>.
Hello Andreas,
Very happy to see you return to the list.
"Greetz,"
Glen
--- "Andreas L. Delmelle" <a_...@pandora.be>
wrote:
>
> Hi,
>
> Try:
>
> <redirect:write
> select="concat('foo',position(),'.html')">
>
> ...
>
> Dunno for sure, but could even be that it needs the
> curly braces for an AVT,
> like so:
>
> <redirect:write select="{concat('foo'...)}">
>
>
> One thing's for sure: ampersands definitely can't be
> used for string
> concatenation in XSLT.
>
>
> Cheers,
>
> Andreas
>
RE: Question concerning Xalan.
Posted by "Andreas L. Delmelle" <a_...@pandora.be>.
Hi,
Try:
<redirect:write select="concat('foo',position(),'.html')">
...
Dunno for sure, but could even be that it needs the curly braces for an AVT,
like so:
<redirect:write select="{concat('foo'...)}">
One thing's for sure: ampersands definitely can't be used for string
concatenation in XSLT.
Cheers,
Andreas
> -----Original Message-----
> From: Johannes Franz [mailto:johannes.franz@rub.de]
> Sent: donderdag 14 oktober 2004 19:18
> To: fop-user@xml.apache.org
> Subject: Re: Question concerning Xalan.
>
>
> Sorry but i am really a newbie:
> When i try your example i get the following error message:
>
>
> <xsl:template match="/doc/foo">
> <redirect:write select="'foo' &position() &'.html'">
> <foo-out>
> <xsl:apply-templates/>
> </foo-out>
> </redirect:write>
> </xsl:template>
>
> java -cp xalan-2.4.1.jar;xerces-1.2.3.jar
> org.apache.xalan.xslt.Process -IN
> Redirect.xml -XSL Redirect.xsl -OUT Redirect.html -HTML
> [Fatal Error] Redirect.xsl:20:44: The reference to entity "position" must
> end with the ';' delimiter.
>
> Redirect.xsl; Line #20; Column #44; XSLT Error
> (javax.xml.transform.TransformerConfigurationException):
> javax.xml.transform.TransformerException:
> org.xml.sax.SAXParseException: The
> reference to entity "position" must end with the ';' delimiter.
>
>
> ----- Original Message -----
> From: "Jeremias Maerki" <de...@greenmail.ch>
> To: <fo...@xml.apache.org>
> Sent: Thursday, October 14, 2004 6:00 PM
> Subject: Re: Question concerning Xalan.
>
>
> > Something like that maybe?
> >
> > <xsl:template match="/doc/foo">
> > <redirect:write select="'foo' & position() & '.html'">
> > <foo-out>
> > <xsl:apply-templates/>
> > </foo-out>
> > </redirect:write>
> > </xsl:template>
> >
> > On 14.10.2004 17:18:25 Johannes Franz wrote:
> >> Hi,
> >>
> >> yeah this is exactly what i needed. But could you please help
> me with the
> >> following problem?
> >> I would like to write to write every childnote to a new file. If there
> >> are 4
> >> Childnodes doc/foo
> >> he should write every childnote to one file: foo1.html foo2.html
> >> foo3.html
> >> foo4.html. Could someone give me example how to realize this?
> >>
> >> <xsl:template match="/doc/foo">
> >> <redirect:write select="@file">
> >> <foo-out>
> >> <xsl:apply-templates/>
> >> </foo-out>
> >> </redirect:write>
> >> </xsl:template>
> >
> >
> > Jeremias Maerki
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
> > For additional commands, e-mail: fop-user-help@xml.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: fop-user-help@xml.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
Re: Question concerning Xalan.
Posted by Johannes Franz <jo...@rub.de>.
Sorry but i am really a newbie:
When i try your example i get the following error message:
<xsl:template match="/doc/foo">
<redirect:write select="'foo' &position() &'.html'">
<foo-out>
<xsl:apply-templates/>
</foo-out>
</redirect:write>
</xsl:template>
java -cp xalan-2.4.1.jar;xerces-1.2.3.jar org.apache.xalan.xslt.Process -IN
Redirect.xml -XSL Redirect.xsl -OUT Redirect.html -HTML
[Fatal Error] Redirect.xsl:20:44: The reference to entity "position" must
end with the ';' delimiter.
Redirect.xsl; Line #20; Column #44; XSLT Error
(javax.xml.transform.TransformerConfigurationException):
javax.xml.transform.TransformerException: org.xml.sax.SAXParseException: The
reference to entity "position" must end with the ';' delimiter.
----- Original Message -----
From: "Jeremias Maerki" <de...@greenmail.ch>
To: <fo...@xml.apache.org>
Sent: Thursday, October 14, 2004 6:00 PM
Subject: Re: Question concerning Xalan.
> Something like that maybe?
>
> <xsl:template match="/doc/foo">
> <redirect:write select="'foo' & position() & '.html'">
> <foo-out>
> <xsl:apply-templates/>
> </foo-out>
> </redirect:write>
> </xsl:template>
>
> On 14.10.2004 17:18:25 Johannes Franz wrote:
>> Hi,
>>
>> yeah this is exactly what i needed. But could you please help me with the
>> following problem?
>> I would like to write to write every childnote to a new file. If there
>> are 4
>> Childnodes doc/foo
>> he should write every childnote to one file: foo1.html foo2.html
>> foo3.html
>> foo4.html. Could someone give me example how to realize this?
>>
>> <xsl:template match="/doc/foo">
>> <redirect:write select="@file">
>> <foo-out>
>> <xsl:apply-templates/>
>> </foo-out>
>> </redirect:write>
>> </xsl:template>
>
>
> Jeremias Maerki
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: fop-user-help@xml.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
Re: Question concerning Xalan.
Posted by Jeremias Maerki <de...@greenmail.ch>.
Something like that maybe?
<xsl:template match="/doc/foo">
<redirect:write select="'foo' & position() & '.html'">
<foo-out>
<xsl:apply-templates/>
</foo-out>
</redirect:write>
</xsl:template>
On 14.10.2004 17:18:25 Johannes Franz wrote:
> Hi,
>
> yeah this is exactly what i needed. But could you please help me with the
> following problem?
> I would like to write to write every childnote to a new file. If there are 4
> Childnodes doc/foo
> he should write every childnote to one file: foo1.html foo2.html foo3.html
> foo4.html. Could someone give me example how to realize this?
>
> <xsl:template match="/doc/foo">
> <redirect:write select="@file">
> <foo-out>
> <xsl:apply-templates/>
> </foo-out>
> </redirect:write>
> </xsl:template>
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
Re: Question concerning Xalan.
Posted by Johannes Franz <jo...@rub.de>.
Hi,
yeah this is exactly what i needed. But could you please help me with the
following problem?
I would like to write to write every childnote to a new file. If there are 4
Childnodes doc/foo
he should write every childnote to one file: foo1.html foo2.html foo3.html
foo4.html. Could someone give me example how to realize this?
<xsl:template match="/doc/foo">
<redirect:write select="@file">
<foo-out>
<xsl:apply-templates/>
</foo-out>
</redirect:write>
</xsl:template>
?
----- Original Message -----
From: "Jeremias Maerki" <de...@greenmail.ch>
To: <fo...@xml.apache.org>
Sent: Friday, September 24, 2004 2:06 PM
Subject: Re: Question concerning Xalan.
> The list info is here: http://xml.apache.org/mail.html#xalan-j-users
>
> You might want to tell them to put that link somewhere on their website.
>
>
> What you're looking for is the "Redirect" extension of Xalan-J:
> http://xml.apache.org/xalan-j/extensionslib.html#redirect
>
> On 24.09.2004 11:06:06 Johannes Franz wrote:
>> Hi there,
>>
>> i don't know where to ask questions concerning Xalan, i didn't find a
>> mailing
>> list at http://xml.apache.org/xalan-j/.
>> Perhaps you can help me:
>>
>> I have a really big xml-file from which i would like to create many
>> little
>> html files. So is this possible to use a big xml-file and a stylesheet in
>> order to create a new html file everytime the Tag <html> occurs?
>
>
>
> Jeremias Maerki
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: fop-user-help@xml.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
Re: Question concerning Xalan.
Posted by Jeremias Maerki <de...@greenmail.ch>.
The list info is here: http://xml.apache.org/mail.html#xalan-j-users
You might want to tell them to put that link somewhere on their website.
What you're looking for is the "Redirect" extension of Xalan-J:
http://xml.apache.org/xalan-j/extensionslib.html#redirect
On 24.09.2004 11:06:06 Johannes Franz wrote:
> Hi there,
>
> i don't know where to ask questions concerning Xalan, i didn't find a mailing
> list at http://xml.apache.org/xalan-j/.
> Perhaps you can help me:
>
> I have a really big xml-file from which i would like to create many little
> html files. So is this possible to use a big xml-file and a stylesheet in
> order to create a new html file everytime the Tag <html> occurs?
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org