I had some problems with this too, especialy when using <xsp:attribute> or
<xsl:attribute>. When using these tags, I had do manualy remove all tabs,
newlines and returns.

If you use

<xsp:attribute><xsp:expr>someVariable</xsp:expr></xsp:attribute>

instead of

<xsp:attribute>
    <xsp:expr>someVariable</xsp:expr>
</xsp:attribute>

you should be fine.
First of all, when using XML-Spy I would set the default viev for all
content to Code-View instead of Enhanced-Griv view, because XML-Spy usualy
messes up this formating.

Regards,
        Christofer Dutz

> > I'm trying to build a website with two frames, one for
> > navigation purposes
> > and a second one for the main content.
> > I'm checking out JavaScript; I'm not very familiar with it,
> > but I got it
> > working in XMLSpy with saxon.
> > The problem is that JavaScript is often complaining about newlines
> > (that I don't know where they are coming from), that it makes it very
> > difficult for me working with
> > it.
>
> That's right, you have to be carefull, when you write javascript in your
> stylesheet.
> Pay attention to extra spaces/carriage returns/tabs when formating the XSL
> in your editor.
> Smart editors indent XSL well, but they also mess things up when you work
> with code...
> I put all my javascript code in a <![CDATA[ ]]>, and it is outputed just
the
> way it looks in my stylesheet (see below).
>
> > So one question is: are there other possibilities for
> > building frames out
> > of one single xml-file?
>
> I'm not really familiar with javascript, and I try to avoid complex
things,
> so my suggestions are:
> 1) you could use a basic HTML file to build the frameset, each frame
> pointing to the appropriate HTML/XML file
> 2) if you really want to build the frameset from one XML file with
> javascript, try to use CDATA sections like this (only the 'xsl:value-of'
or
> XSLT stuffs are "outside"):
>
>    <xsl:template match="foo:order">
>       <xsl:apply-templates select="common:form" />
> <SCRIPT language='JavaScript'>
> <![CDATA[function refreshTable()
> {
>     var i;
>     var total = 0;
>     for (i=0; i<]]><xsl:value-of select="count(//foo:product)"
/><![CDATA[;
> i++) {
>         var q;
>         var p;
> ......
> } ]]>
> </SCRIPT>
>    </xsl:template>
>
> Note: you don't have to use
> <![CDATA[']]><![CDATA[+']]>
> <![CDATA['+']]> is enough.
> Same thing for <xsl:element name="br"/>, <br/> doas the same thing and
it's
> shorter
>
> > The second question concerns cocoon (1.8.2 on tomcat 3.2.1):
> > cocoon won't
> > display the frames (only shows the main frame) but doesn't give an
> > error message. I am missing something?
>
> It's a browser issue; look at the HTML source of the page to see what
> happens.
> Olivier
>
> ---------------------------------------------------------------------
> 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: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>
>


---------------------------------------------------------------------
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: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to