close-popup.xsl 809 B

123456789101112131415161718192021222324252627282930
  1. <?xml version="1.0"?>
  2. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  3. xmlns:eat="http://msqr.us/xsd/ieat"
  4. xmlns:xweb="http://msqr.us/xsd/jaxb-web"
  5. exclude-result-prefixes="eat xweb">
  6. <xsl:output method="xml" omit-xml-declaration="no"
  7. doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
  8. doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"/>
  9. <xsl:template match="xweb:x-data">
  10. <html>
  11. <body>
  12. <script type="text/javascript" xml:space="preserve">
  13. <xsl:comment>
  14. function init() {
  15. if ( !window.opener ) {
  16. alert("No opener!");
  17. return;
  18. }
  19. window.close();
  20. }
  21. init();
  22. //</xsl:comment>
  23. </script>
  24. </body>
  25. </html>
  26. </xsl:template>
  27. </xsl:stylesheet>