emptyRendering.xslt 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. IBM Cognos Products: HTS
  5. (C) Copyright IBM Corp. 2005, 2010
  6. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. -->
  8. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xts="http://developer.cognos.com/schemas/xts/">
  9. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
  10. <xsl:template match="/">
  11. <script type="text/javascript">
  12. /**
  13. * Just pass it on to children. This may not be necessary, When destory is called
  14. * on the parent. However it may be need in other cases if they exist. The event
  15. * is then passed back to the parent as well.
  16. */
  17. function _THIS_unload(evt) {
  18. //Distribute to children
  19. var _THIS_distList = new Array();
  20. var _THIS_children = _THIS_.getChildren();
  21. var i, l = _THIS_children.length;
  22. for (i = 0; i &lt; l; i++) {
  23. _THIS_distList[i] = _THIS_children[i].id;
  24. }
  25. //do not bubble.
  26. evt.bubbles = false;
  27. _F_Event.distribute(_THIS_distList,evt);
  28. }
  29. function _THIS_init() {
  30. //Distribute to children
  31. var _THIS_distList = new Array();
  32. var _THIS_children = _THIS_.getChildren();
  33. var i, l = _THIS_children.length;
  34. for (i = 0; i &lt; l; i++) {
  35. _THIS_distList[i] = _THIS_children[i].id;
  36. }
  37. _F_Event.distribute(_THIS_distList,evt);
  38. }
  39. _THIS_.addEventListener('fragment.unload','_THIS_unload', false);
  40. _THIS_.addEventListener('fragment.load','_THIS_init', false);
  41. </script>
  42. </xsl:template>
  43. </xsl:stylesheet>