You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Jorn Heid <he...@fh-heilbronn.de> on 2001/09/06 16:40:33 UTC

[C2] Output indent problem NOT solved

This works for the main xslt-stylesheet but when using xsl:include the
problem remains:

<html><head><META http-equiv="Content-Type" content="text/html;
charset=UTF-8"><title>n3k Homepage</title><meta content="Agents in Action"
name="autor"><meta content="english, en" name="language"><meta
content="coming soon...." name="description"><meta content="coming soon...."
name="keywords"><meta content="follow" name="robots"><link
href="/images/n3k.ico" rel="shortcut icon"></head><body marginheight="0"
marginwidth="0" margintop="0" marginleft="0" topmargin="0" leftmargin="0"
bgcolor="#ffffff"><div
style="padding-left:10px;padding-right:10px;padding-top:50px">
		<h1
style="color:#0C3D91;font-size:13pt;font-weight:bold;font-family:verdana,ari
al,sans-serif">The IP &amp; Performance Management Experts</h1>
		<div
style="padding-left:40px;color:#000000;font-size:9pt;font-weight:normal;font
-family:verdana,arial,sans-serif" class="text"> With the rapid growth of IP
networks we are uniquely placed to provide the very best solutions to manage
and control corporate IP networks. Founded in 1996, as Internet &amp;
Intranet Solutions we developed rapidly into the largest reseller in our
niche. We have just changed our name to n3k Informatik as part of a wider
European alliance. The company provides total solutions in the following
areas: <i>
				<ul>
...

As you can see the indent is still there - with all elements which I have
included using

<xsl:include href="content.xsl"/>

The sitemap:

			<map:serializer name="html" mime-type="text/html"
src="org.apache.cocoon.serialization.HTMLSerializer">
	 		        <preserve-space>false</preserve-space>
                          <indent>no</indent>
                  </map:serializer>


Is this a bug?

JOERN_HEID



-----Ursprungliche Nachricht-----
Von: Jorg Heinicke [mailto:jheinicke@virbus.de]
Gesendet: Donnerstag, 6. September 2001 13:29
An: cocoon-users@xml.apache.org
Betreff: Re: [C2]Output indent problem.


Cocoon 2 (don't know Cocoon 1) ignores the <xsl:output>, you must this
parameters in the sitemap. Have a look at
http://xml.apache.org/cocoon2/sitemap.html. There can be found examples at
he point 'Serializers'.

Joerg

Ling Kok Choon wrote:
> Hi All,
>
>   I use cocoon to build a web site, when the output ( html ) shown, and i
view the source, the
> html code is in very well form.
>
>   like:
>
> <table>
> <tr>
> <td>
> <img src="pic/p1.gif"/>
> </td>
> </tr>
> <tr>
> <td>
> <img src="pic/p2.gif"/>
> </td>
> </tr>
> </table>
>
> so it make my output ( html ) got a space between this 2 pic, and what i
need is this 2 image
> joined togather, like:
>
> <table>
> <tr><td><img src="pic/p1.gif"/></td></tr>
> <tr><td><img src="pic/p2.gif"/></td></tr>
> </table>
>
> but how to let the output ( html ) like above ? i have try to put
<xsl:output type="html"
> indent="no"/> on the xsl, but still can't work. Is anyone can help me ?
>
>
>
> Thank you.
>
>
> Kok Choon.


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

To unsubscribe, e-mail: <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/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: [C2] Output indent problem NOT solved

Posted by Jörg Heinicke <jh...@virbus.de>.
Are you using <xsl:apply-templates/> anywhere exactly in this forms, i.e. 
without select-attribute? Then you match on text()-nodes too, e.g. line 
wraps. They will be copied into the output-document too.

Depending on your XSL the following template COULD help:

<xsl:template match="text()"/>

Joerg

Jorn Heid wrote:
> This works for the main xslt-stylesheet but when using xsl:include the
> problem remains:
> 
> <html><head><META http-equiv="Content-Type" content="text/html;
> charset=UTF-8"><title>n3k Homepage</title><meta content="Agents in Action"
> name="autor"><meta content="english, en" name="language"><meta
> content="coming soon...." name="description"><meta content="coming soon...."
> name="keywords"><meta content="follow" name="robots"><link
> href="/images/n3k.ico" rel="shortcut icon"></head><body marginheight="0"
> marginwidth="0" margintop="0" marginleft="0" topmargin="0" leftmargin="0"
> bgcolor="#ffffff"><div
> style="padding-left:10px;padding-right:10px;padding-top:50px">
> 		<h1
> style="color:#0C3D91;font-size:13pt;font-weight:bold;font-family:verdana,ari
> al,sans-serif">The IP &amp; Performance Management Experts</h1>
> 		<div
> style="padding-left:40px;color:#000000;font-size:9pt;font-weight:normal;font
> -family:verdana,arial,sans-serif" class="text"> With the rapid growth of IP
> networks we are uniquely placed to provide the very best solutions to manage
> and control corporate IP networks. Founded in 1996, as Internet &amp;
> Intranet Solutions we developed rapidly into the largest reseller in our
> niche. We have just changed our name to n3k Informatik as part of a wider
> European alliance. The company provides total solutions in the following
> areas: <i>
> 				<ul>
> ...
> 
> As you can see the indent is still there - with all elements which I have
> included using
> 
> <xsl:include href="content.xsl"/>
> 
> The sitemap:
> 
> 			<map:serializer name="html" mime-type="text/html"
> src="org.apache.cocoon.serialization.HTMLSerializer">
> 	 		        <preserve-space>false</preserve-space>
>                           <indent>no</indent>
>                   </map:serializer>
> 
> 
> Is this a bug?
> 
> JOERN_HEID


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

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: [C2] Output indent problem NOT solved

Posted by Michael McKibben <mm...@ncube.com>.
Hello, I am not sure if you have stumbled across a bug or not, but I have
gotten xinclude to work without indenting in C2b2. The way I got this to
work is by including an internal pipeline using a cocoon:// style url from
my aggregate xml file (probably not the only way, but this is what I am
doing). So my sitemap looks something like:

<map:pipeline>
...
<map:match pattern="/aggregateFile">
	<map:generate src="aggregateFile.xml"/>
	<map:transform type="xinclude"/>
	<map:transform type="xslt" src="someStylesheet.xsl"/>
	<map:serialize type="html">
</map:match>
...
</map:pipeline>

<map:pipeline internal-only="true">
	<map:match pattern="/included/file1">
		<map:generate src="file1.xml"/>
		<map:serialize type="xml"/>
	</map:match>
</map:pipeline>

And in my "aggregateFile.xml" I have an xinclude lines like the following
	<xs:include href="cocoon://included/file1" parse="xml"/>

And of course don't forget the <indent>no</indent> for your serializers.
Hope this helps!

Regards,

--mike

On Thu, 6 Sep 2001, Jorn Heid wrote:

> This works for the main xslt-stylesheet but when using xsl:include the
> problem remains:
>
> <html><head><META http-equiv="Content-Type" content="text/html;
> charset=UTF-8"><title>n3k Homepage</title><meta content="Agents in Action"
> name="autor"><meta content="english, en" name="language"><meta
> content="coming soon...." name="description"><meta content="coming soon...."
> name="keywords"><meta content="follow" name="robots"><link
> href="/images/n3k.ico" rel="shortcut icon"></head><body marginheight="0"
> marginwidth="0" margintop="0" marginleft="0" topmargin="0" leftmargin="0"
> bgcolor="#ffffff"><div
> style="padding-left:10px;padding-right:10px;padding-top:50px">
> 		<h1
> style="color:#0C3D91;font-size:13pt;font-weight:bold;font-family:verdana,ari
> al,sans-serif">The IP &amp; Performance Management Experts</h1>
> 		<div
> style="padding-left:40px;color:#000000;font-size:9pt;font-weight:normal;font
> -family:verdana,arial,sans-serif" class="text"> With the rapid growth of IP
> networks we are uniquely placed to provide the very best solutions to manage
> and control corporate IP networks. Founded in 1996, as Internet &amp;
> Intranet Solutions we developed rapidly into the largest reseller in our
> niche. We have just changed our name to n3k Informatik as part of a wider
> European alliance. The company provides total solutions in the following
> areas: <i>
> 				<ul>
> ...
>
> As you can see the indent is still there - with all elements which I have
> included using
>
> <xsl:include href="content.xsl"/>
>
> The sitemap:
>
> 			<map:serializer name="html" mime-type="text/html"
> src="org.apache.cocoon.serialization.HTMLSerializer">
> 	 		        <preserve-space>false</preserve-space>
>                           <indent>no</indent>
>                   </map:serializer>
>
>
> Is this a bug?
>
> JOERN_HEID
>
>
>
> -----Ursprungliche Nachricht-----
> Von: Jorg Heinicke [mailto:jheinicke@virbus.de]
> Gesendet: Donnerstag, 6. September 2001 13:29
> An: cocoon-users@xml.apache.org
> Betreff: Re: [C2]Output indent problem.
>
>
> Cocoon 2 (don't know Cocoon 1) ignores the <xsl:output>, you must this
> parameters in the sitemap. Have a look at
> http://xml.apache.org/cocoon2/sitemap.html. There can be found examples at
> he point 'Serializers'.
>
> Joerg
>
> Ling Kok Choon wrote:
> > Hi All,
> >
> >   I use cocoon to build a web site, when the output ( html ) shown, and i
> view the source, the
> > html code is in very well form.
> >
> >   like:
> >
> > <table>
> > <tr>
> > <td>
> > <img src="pic/p1.gif"/>
> > </td>
> > </tr>
> > <tr>
> > <td>
> > <img src="pic/p2.gif"/>
> > </td>
> > </tr>
> > </table>
> >
> > so it make my output ( html ) got a space between this 2 pic, and what i
> need is this 2 image
> > joined togather, like:
> >
> > <table>
> > <tr><td><img src="pic/p1.gif"/></td></tr>
> > <tr><td><img src="pic/p2.gif"/></td></tr>
> > </table>
> >
> > but how to let the output ( html ) like above ? i have try to put
> <xsl:output type="html"
> > indent="no"/> on the xsl, but still can't work. Is anyone can help me ?
> >
> >
> >
> > Thank you.
> >
> >
> > Kok Choon.
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <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/faqs.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/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>