Loading ...
Sorry, an error occurred while loading the content.

Calendar widget and XSLT

Expand Messages
  • solutionsnetlogik
    I am trying to use the calendar widget in a XSLT project and am unable to receive a workable output from the script. All HTML tags are escaped (i.e.
    Message 1 of 3 , Mar 28, 2006
    • 0 Attachment
      I am trying to use the calendar widget in a XSLT project and am unable
      to receive a workable output from the script. All HTML tags are
      escaped (i.e. <div> instead of <div>) from the calendar script,
      which other than that outputs correctly. I can use the script in every
      other possible combination so it's not a browser- or profile-specific
      issue.

      The setup is a basic XML/XSLT setup: load a server-transformed XML
      with a XSLT stylesheet. Every combination I tried with a XSLT gave me
      escaped code. Copying the rendered source and saving to an HTML file
      that calls the calendar script works fine so this seems to be specific
      to XSLT and an obstacle that would prevent us from using the widget
      altogether.


      Thanks in advance for any help,
      Rich.
    • Steven Peterson
      Rich, I did some fishing around, and was wondering if you re making sure to enclose the output in a CDATA block so that the HTML doesn t get parsed. A
      Message 2 of 3 , Mar 29, 2006
      • 0 Attachment

        Rich,

         

        I did some fishing around, and was wondering if you’re making sure to enclose the output in a CDATA block so that the HTML doesn’t get parsed. A co-worker forwarded this to me:

         

        See http://www.w3.org/TR/xslt#section-HTML-Output-Method

        Specifically:

        The html output method should not perform escaping for the content of the script and style elements. For example, a literal result element written in the stylesheet as

        <script>if (a &lt; b) foo()</script>

        or

        <script><![CDATA[if (a < b) foo()]]></script>

        should be output as

        <script>if (a < b) foo()</script>

         

         

        Steven Peterson

        Web Developer, Platform Engineering

        Yahoo!


        From: ydn-javascript@yahoogroups.com [mailto: ydn-javascript@yahoogroups.com ] On Behalf Of solutionsnetlogik
        Sent: Tuesday, March 28, 2006 7:11 AM
        To: ydn-javascript@yahoogroups.com
        Subject: [ydn-javascript] Calendar widget and XSLT

         

        I am trying to use the calendar widget in a XSLT project and am unable
        to receive a workable output from the script. All HTML tags are
        escaped (i.e. &lt;div&gt; instead of <div>) from the calendar script,
        which other than that outputs correctly. I can use the script in every
        other possible combination so it's not a browser- or profile-specific
        issue.

        The setup is a basic XML/XSLT setup: load a server-transformed XML
        with a XSLT stylesheet. Every combination I tried with a XSLT gave me
        escaped code. Copying the rendered source and saving to an HTML file
        that calls the calendar script works fine so this seems to be specific
        to XSLT and an obstacle that would prevent us from using the widget
        altogether.


        Thanks in advance for any help,
        Rich.





      • solutionsnetlogik
        Hi! I put it off for a while to work on other things so sorry about the late reply. Many thank for your help, it works fine when the script is enclosed in
        Message 3 of 3 , Apr 19 7:21 AM
        • 0 Attachment
          Hi! I put it off for a while to work on other things so sorry about
          the late reply. Many thank for your help, it works fine when the
          script is enclosed in CDATA! Should have found that while getting more
          comfortable with XSL...

          Will save looots of javascript pain ;)


          Thanks!
          Rich.


          --- In ydn-javascript@yahoogroups.com, "Steven Peterson"
          <peterson@...> wrote:
          >
          > Rich,
          >
          >
          >
          > I did some fishing around, and was wondering if you're making sure to
          > enclose the output in a CDATA block so that the HTML doesn't get
          parsed. A
          > co-worker forwarded this to me:
          >
          >
          >
          > See http://www.w3.org/TR/xslt#section-HTML-Output-Method
          >
          > Specifically:
          >
          > The html output method should not perform escaping for the content
          of the
          > script and style elements. For example, a literal result element
          written in
          > the stylesheet as
          >
          > <script>if (a < b) foo()</script>
          >
          > or
          >
          > <script><![CDATA[if (a < b) foo()]]></script>
          >
          > should be output as
          >
          > <script>if (a < b) foo()</script>
          >
          >
          >
          >
          >
          > Steven Peterson
          >
          > Web Developer, Platform Engineering
          >
          > Yahoo!
          >
          > _____
          >
          > From: ydn-javascript@yahoogroups.com
          [mailto:ydn-javascript@yahoogroups.com]
          > On Behalf Of solutionsnetlogik
          > Sent: Tuesday, March 28, 2006 7:11 AM
          > To: ydn-javascript@yahoogroups.com
          > Subject: [ydn-javascript] Calendar widget and XSLT
          >
          >
          >
          > I am trying to use the calendar widget in a XSLT project and am unable
          > to receive a workable output from the script. All HTML tags are
          > escaped (i.e. <div> instead of <div>) from the calendar script,
          > which other than that outputs correctly. I can use the script in every
          > other possible combination so it's not a browser- or profile-specific
          > issue.
          >
          > The setup is a basic XML/XSLT setup: load a server-transformed XML
          > with a XSLT stylesheet. Every combination I tried with a XSLT gave me
          > escaped code. Copying the rendered source and saving to an HTML file
          > that calls the calendar script works fine so this seems to be specific
          > to XSLT and an obstacle that would prevent us from using the widget
          > altogether.
          >
          >
          > Thanks in advance for any help,
          > Rich.
          >
          >
          >
          >
          >
          >
          >
          > _____
          >
          > YAHOO! GROUPS LINKS
          >
          >
          >
          > * Visit your group "ydn-javascript
          > <http://groups.yahoo.com/group/ydn-javascript> " on the web.
          >
          > * To unsubscribe from this group, send an email to:
          > ydn-javascript-unsubscribe@yahoogroups.com
          > <mailto:ydn-javascript-unsubscribe@yahoogroups.com?subject=Unsubscribe>
          >
          > * Your use of Yahoo! Groups is subject to the Yahoo!
          > <http://docs.yahoo.com/info/terms/> Terms of Service.
          >
          >
          >
          > _____
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.