Hi,

I have a few problems stemming from including a javascript file into my
publication which is based on the default publication.

I have created a custom xsl sheet based on page2xhtml.xsl (only a small
difference in the includes). Inside the xsl sheet, to include a javascript
file, I do '<script src="../scripts/calendar.js"> </script>'

Inside my sitemap[1] I do :

<map:match pattern="**/*.js">
        <map:read mime-type="text/javascript"
                  src="resources/shared/scripts/{2}.js"/>
</map:match>


My problems:

1. In the IE 6.0 browser I get an 'xml' view of the file. When I save the file and open that, I get a blank page. When I correct <script src="../scripts/calendar.js/"> (which has been somehow somewhere applied instead of my code) to <script src="../scripts/calendar.js> </scripts>
and open that file it all displays fine, with no javascript errors.


2. In the Firefox browser I keep on getting javascript errors, ( element.style does not have properties) BUT I am sure that the script is 'correct' as it runs happily on the Firefox browser in a different application.


I'd really appreciate any hints on what I could be doing wrong in my pipeline to make my browsers so unhappy :(

Thanks in advance,

- vica

-----------
[1] snippet of my publication-sitemap.xmap

...

<map:pipeline>
    <map:match pattern="**/search.htm">
        <map:aggregate element="cmsbody">
<map:part src="cocoon://navigation/{page-envelope:publication-id}/{page-envelope:area}/breadcrumb/index.xml"/> <map:part src="cocoon://navigation/{page-envelope:publication-id}/{page-envelope:area}/tabs/index.xml"/> <map:part src="cocoon://navigation/{page-envelope:publication-id}/{page-envelope:area}/menu/index.xml"/>
            <map:part src="xsp/searchPage.xml"/>
        </map:aggregate>
        <map:transform src="xsp/searchPage.xsl">
            <map:parameter name="area" value="{page-envelope:area}"/>
<map:parameter name="root" value="{page-envelope:context-prefix}/{page-envelope:publication-id}"/>
            <map:parameter name="img_source" value="images/calendar.gif"/>
        </map:transform>
        <map:transform src="xslt/page2xhtml-xsp.xsl">
<map:parameter name="root" value="{page-envelope:context-prefix}/{page-envelope:publication-id}/{page-envelope:area}"/>
          <map:parameter name="document-id" value="/index"/>
          <map:parameter name="url" value="{page-envelope:area}/index.html"/>
<map:parameter name="language" value="{page-envelope:document-language}"/>
        </map:transform>
        <map:serialize type="xml"/>
    </map:match>  

    <map:match pattern="**/*.js">
<map:read mime-type="text/javascript" src="resources/shared/scripts/{2}.js"/>
    </map:match>

    </map:pipeline>

etc...


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to