/[suikacvs]/messaging/manakai/doc/template/disdump-test.ja.xhtml
Suika

Contents of /messaging/manakai/doc/template/disdump-test.ja.xhtml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations) (download)
Fri Sep 9 04:20:51 2005 UTC (20 years, 7 months ago) by wakaba
Branch: MAIN
Changes since 1.1: +5 -1 lines
New template rules added

1 wakaba 1.1 <?xml version="1.0" encoding="iso-2022-jp"?>
2     <html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja">
3     <head>
4     <title>disdump.ja.xsl $B$K$h$kJQ49$N%F%9%H(B</title>
5     <link rel="stylesheet" href="../style/disdump-style.css" media="all"/>
6    
7     <script type="text/javascript">
8     <![CDATA[
9     var sourceDocumentURI = '../doc.xml';
10     var stylesheetDocumentURI = '../template/disdump.ja.xsl';
11     var ddlistStylesheetDocumentURI = '../template/ddlist.ja.xsl';
12    
13     function loadDocument (uri, onload) {
14     var doc = document.implementation.createDocument (null, "dummy", null);
15     doc.addEventListener ("load", function () {onload (doc)}, false);
16     doc.load (uri);
17     return doc;
18     }
19    
20     function t (el) {
21     const ddoct = 'http://suika.fam.cx/~wakaba/archive/2005/8/disdump-xslt#';
22     var xp3 = new XSLTProcessor ();
23     xp3.setParameter (null, 'mode', el.getAttributeNS (ddoct, 'mode'));
24     xp3.setParameter (null, 'uri', el.getAttributeNS (ddoct, 'uri'));
25     loadDocument (sourceDocumentURI, function (srcDoc) {
26     loadDocument (stylesheetDocumentURI, function (doc) {
27     xp3.importStylesheet (doc);
28     var tfra = xp3.transformToFragment (srcDoc, document);
29    
30     var r2 = document.getElementById ('result2');
31     r2.textContent = '';
32     r2.appendChild (tfra);
33     });
34     });
35 wakaba 1.2 document.getElementById ('re1').onclick = function () { t (el) };
36     document.getElementById ('re2').onclick = function () { t (el) };
37 wakaba 1.1 }
38     ]]>
39     </script>
40     </head>
41    
42     <body>
43     <h1>disdump.ja.xsl $B$K$h$kJQ49$N%F%9%H(B</h1>
44    
45     <div class="section">
46     <h2>$BJQ49%b!<%I(B</h2>
47     <div id="result1" lang="" xml:lang=""/>
48     </div>
49    
50     <div class="section">
51     <h2>$BJQ497k2L(B</h2>
52 wakaba 1.2 <p class="non-para"><button id="re1">$B:FJQ49(B</button></p>
53 wakaba 1.1 <div id="result2" lang="" xml:lang=""/>
54 wakaba 1.2 <p class="non-para"><button id="re2">$B:FJQ49(B</button></p>
55 wakaba 1.1 </div>
56    
57     <script type="text/javascript">
58     <![CDATA[
59     document.SourceDocument = loadDocument (sourceDocumentURI, function (srcDoc) {
60     var xp = new XSLTProcessor ();
61     loadDocument (stylesheetDocumentURI, function (doc) {
62     xp.importStylesheet (doc);
63    
64     xp.setParameter (null, 'mode', 'list');
65    
66     var tdoc = xp.transformToDocument (srcDoc);
67    
68     loadDocument (ddlistStylesheetDocumentURI, function (ddlistt) {
69     var xp2 = new XSLTProcessor ();
70     xp2.importStylesheet (ddlistt);
71     xp2.setParameter (null, 'mode', 'html-list');
72     document.getElementById ('result1')
73     .appendChild (xp2.transformToFragment (tdoc, document));
74     });
75     });
76     });
77    
78     ]]>
79     </script>
80     </body>
81     </html>
82    
83 wakaba 1.2 <!-- Revision: $Date: 2005/09/05 15:09:58 $ -->
84 wakaba 1.1
85     <!-- ***** BEGIN LICENSE BLOCK *****
86     - Copyright 2005 Wakaba <w@suika.fam.cx>. All rights reserved.
87     -
88     - This program is free software; you can redistribute it and/or
89     - modify it under the same terms as Perl itself.
90     -
91     - Alternatively, the contents of this file may be used
92     - under the following terms (the "MPL/GPL/LGPL"),
93     - in which case the provisions of the MPL/GPL/LGPL are applicable instead
94     - of those above. If you wish to allow use of your version of this file only
95     - under the terms of the MPL/GPL/LGPL, and not to allow others to
96     - use your version of this file under the terms of the Perl, indicate your
97     - decision by deleting the provisions above and replace them with the notice
98     - and other provisions required by the MPL/GPL/LGPL. If you do not delete
99     - the provisions above, a recipient may use your version of this file under
100     - the terms of any one of the Perl or the MPL/GPL/LGPL.
101     -
102     - "MPL/GPL/LGPL":
103     -
104     - The contents of this file are subject to the Mozilla Public License Version
105     - 1.1 (the "License"); you may not use this file except in compliance with
106     - the License. You may obtain a copy of the License at
107     - http://www.mozilla.org/MPL/
108     -
109     - Software distributed under the License is distributed on an "AS IS" basis,
110     - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
111     - for the specific language governing rights and limitations under the
112     - License.
113     -
114     - The Original Code is manakai disdump.
115     -
116     - The Initial Developer of the Original Code is
117     - Wakaba <w@suika.fam.cx>.
118     - Portions created by the Initial Developer are Copyright (C) 2005
119     - the Initial Developer. All Rights Reserved.
120     -
121     - Contributor(s):
122     - Wakaba <w@suika.fam.cx>
123     -
124     - Alternatively, the contents of this file may be used under the terms of
125     - either the GNU General Public License Version 2 or later (the "GPL"), or
126     - the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
127     - in which case the provisions of the GPL or the LGPL are applicable instead
128     - of those above. If you wish to allow use of your version of this file only
129     - under the terms of either the GPL or the LGPL, and not to allow others to
130     - use your version of this file under the terms of the MPL, indicate your
131     - decision by deleting the provisions above and replace them with the notice
132     - and other provisions required by the LGPL or the GPL. If you do not delete
133     - the provisions above, a recipient may use your version of this file under
134     - the terms of any one of the MPL, the GPL or the LGPL.
135     -
136     - ***** END LICENSE BLOCK ***** -->

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24