├── .gitattributes ├── .gitignore ├── LICENSE.txt ├── app ├── dita-ot-175 │ ├── common │ │ ├── dita-textonly.xsl.html │ │ ├── dita-utilities.xsl.html │ │ ├── map2textonly.xsl.html │ │ ├── output-message.xsl.html │ │ ├── related-links.xsl.html │ │ ├── topic2textonly.xsl.html │ │ └── ui-d2textonly.xsl.html │ ├── dita2html-base.xsl.html │ ├── dita2html5.xsl.html │ ├── index.html │ ├── theme.css │ └── xslhtml │ │ ├── abbrev-d.xsl.html │ │ ├── conceptdisplay.xsl.html │ │ ├── dita2html5Impl.xsl.html │ │ ├── dita2htmlImpl.xsl.html │ │ ├── flag-old.xsl.html │ │ ├── flag.xsl.html │ │ ├── get-meta.xsl.html │ │ ├── glossdisplay.xsl.html │ │ ├── hi-d.xsl.html │ │ ├── hi-d2html5.xsl.html │ │ ├── htmlflag.xsl.html │ │ ├── pr-d.xsl.html │ │ ├── refdisplay.xsl.html │ │ ├── rel-links.xsl.html │ │ ├── sw-d.xsl.html │ │ ├── syntax-braces.xsl.html │ │ ├── taskdisplay.xsl.html │ │ ├── ui-d.xsl.html │ │ └── ut-d.xsl.html ├── error.txt ├── msg.txt ├── new-output │ ├── doctype-functions.xsl.html │ ├── highlight-file.xsl.html │ ├── index.html │ ├── make-toc.xsl.html │ ├── theme.css │ ├── xmlspectrum.xsl.html │ ├── xq-handler.xsl.html │ ├── xq-spectrum.xsl.html │ ├── xslt-formatting-functions.xsl.html │ └── xslt-xpathlexer-functions.xsl.html ├── output │ ├── VERSION.html │ ├── XQueryML30.xq.html │ ├── blog-sample.html │ ├── default.xqy.html │ ├── deltaxml-result.html │ ├── devtest.xql.html │ ├── docbook.xsl.html │ ├── doctype-functions.xsl.html │ ├── dummy.xsl.html │ ├── explain-deltas.xsl.html │ ├── get-code.xqy.html │ ├── highlight-file.xsl.html │ ├── highlighted-inline.html │ ├── index.html │ ├── index.html.html │ ├── janblog.html │ ├── json.xqy.html │ ├── make-toc.xsl.html │ ├── nesting-prob.xq.html │ ├── noname.html │ ├── notepad.xml.html │ ├── o1.html │ ├── output │ │ ├── sample.xqy.html │ │ ├── theme.css │ │ └── xms-output.html │ ├── overlapping-d21.xml │ ├── overlapping-d21.xml.html │ ├── release-toc │ │ ├── doctype-functions.xsl.html │ │ ├── highlight-file.xsl.html │ │ ├── index.html │ │ ├── make-toc.xsl.html │ │ ├── theme.css │ │ ├── xmlspectrum.xsl.html │ │ ├── xq-handler.xsl.html │ │ ├── xq-spectrum.xsl.html │ │ └── xslt-formatting-functions.xsl.html │ ├── s1.html │ ├── sample.xml.html │ ├── sample2.xml.html │ ├── schema-assert.xsd.html │ ├── schematron.xml.html │ ├── search-ui.xqy.html │ ├── string-test.txt │ ├── sub │ │ ├── bigsub │ │ │ └── dummy3.xsl.html │ │ └── dummy2.xsl.html │ ├── test1.xsl.html │ ├── test2.xsl.html │ ├── test3.xsl.html │ ├── test4.xsl.html │ ├── tvt.xml │ ├── w3c-out-ten.xhtml │ ├── xmlspectrum.xsl.html │ ├── xms-output.html │ ├── xpath-text.txt.html │ ├── xpath3.txt.html │ ├── xpath4.txt.html │ ├── xpath5.txt.html │ ├── xpathcolorer-x.xsl.html │ ├── xpathcolorer-y.xsl.html │ ├── xproccorb.xpl.html │ ├── xq-handler.xsl.html │ ├── xq-spectrum.xsl.html │ ├── xqdoc-display.xqy.html │ ├── xquery30-examples.html │ ├── xslt-formatting-functions.xsl.html │ ├── xslt-xpathlexer-functions.xsl.html │ └── xslt │ │ └── base │ │ ├── common │ │ ├── common.xsl.html │ │ ├── control.xsl.html │ │ ├── footnotes.xsl.html │ │ ├── functions.xsl.html │ │ ├── gentext.xsl.html │ │ ├── inlines.xsl.html │ │ ├── l10n.xsl.html │ │ ├── label-content.xsl.html │ │ ├── normalize.xsl.html │ │ ├── olink.xsl.html │ │ ├── preprocess.xsl.html │ │ ├── spspace.xsl.html │ │ ├── table.xsl.html │ │ ├── title-content.xsl.html │ │ └── titlepages.xsl.html │ │ ├── html │ │ ├── admonitions.xsl.html │ │ ├── autoidx.xsl.html │ │ ├── autotoc.xsl.html │ │ ├── biblio.xsl.html │ │ ├── blocks.xsl.html │ │ ├── callouts.xsl.html │ │ ├── chunker.xsl.html │ │ ├── component.xsl.html │ │ ├── division.xsl.html │ │ ├── docbook.xsl.html │ │ ├── footnotes.xsl.html │ │ ├── formal.xsl.html │ │ ├── glossary.xsl.html │ │ ├── graphics.xsl.html │ │ ├── html.xsl.html │ │ ├── index.xsl.html │ │ ├── info.xsl.html │ │ ├── inlines.xsl.html │ │ ├── lists.xsl.html │ │ ├── math.xsl.html │ │ ├── msgset.xsl.html │ │ ├── oosynopsis.xsl.html │ │ ├── param.xsl.html │ │ ├── pi.xsl.html │ │ ├── qandaset.xsl.html │ │ ├── refentry.xsl.html │ │ ├── section.xsl.html │ │ ├── synopsis.xsl.html │ │ ├── table.xsl.html │ │ ├── task.xsl.html │ │ ├── title-markup.xsl.html │ │ ├── titlepage.xsl.html │ │ ├── titlepages.xsl.html │ │ ├── toc.xsl.html │ │ ├── verbatim-patch.xsl.html │ │ ├── verbatim.xsl.html │ │ ├── xlink.xsl.html │ │ └── xref.xsl.html │ │ └── preprocess │ │ ├── 1-db4to5.xsl.html │ │ ├── 1-logstruct.xsl.html │ │ ├── 15-transclude.xsl.html │ │ ├── 2-profile.xsl.html │ │ ├── 3-schemaext.xsl.html │ │ └── 4-normalize.xsl.html ├── readme.md ├── readme.txt ├── samples │ ├── 3.1-XQueout.htm │ ├── XQuery 3_0 An XML Query Language.htm │ ├── badly-formatted-extract.html │ ├── blog-sample.html │ ├── cdata-sample.xml │ ├── cmdline-test.txt │ ├── doc1.xml │ ├── doc2.xml │ ├── format2.xml │ ├── formatting.html │ ├── formatting.xml │ ├── globals.xml │ ├── highlight-xquery-w3c-out.xhtml │ ├── html-inline-sample.html │ ├── janblog.html │ ├── javalog.log │ ├── nolines.xml │ ├── notepad.xml │ ├── output │ │ ├── sample.xml.html │ │ └── theme.css │ ├── pre.xml │ ├── preserve.xml │ ├── sample.xml │ ├── sample2.xml │ ├── schema-assert.xsd │ ├── schematron-nolines.xml │ ├── schematron.xml │ ├── singleline.xml │ ├── spectrum.flat.xsl │ ├── titedoc.dita │ ├── top.xml │ ├── tvt1.xml │ ├── w3c-out-30.xhtml │ ├── w3c-xq-out-90.xhtml │ ├── w3c-xq-out-92.xhtml │ ├── w3c-xq-out.xhtml │ ├── w3c-xq-test.xhtml │ ├── xmlspec.log │ ├── xms-out │ │ ├── doc1.xml.html │ │ ├── spectrum.flat.xsl.html │ │ ├── theme.css │ │ └── tvt1.xml.html │ ├── xpath-text.txt │ ├── xpath3.txt │ ├── xpath4.txt │ ├── xpath5.txt │ ├── xpathcolorer-x.html │ ├── xpathcolorer-x.xsl │ ├── xpathcolorer-y.xsl │ ├── xproccorb.html │ ├── xproccorb.xpl │ ├── xquery-w3c-out.xhtml │ ├── xquery │ │ ├── Untitled2.xquery │ │ ├── XQueryML30.xq │ │ ├── default.xqy │ │ ├── devtest-large.xql │ │ ├── devtest.xql │ │ ├── get-code.xqy │ │ ├── get-module.xqy │ │ ├── json.xqy │ │ ├── nesting-prob.xq │ │ ├── sample.xqy │ │ ├── search-ui.xqy │ │ ├── xqdoc-display.xqy │ │ └── xqdoc-display2.xqy │ └── xslt3 │ │ ├── shadow.xsl │ │ ├── test1.xsl │ │ ├── test2.xsl │ │ ├── test3.xsl │ │ ├── test4.xsl │ │ └── xms-out │ │ ├── shadow.xsl.html │ │ ├── test4.xsl.html │ │ └── theme.css ├── self-out │ ├── doctype-functions.xsl.html │ ├── highlight-file.xsl.html │ ├── index.html │ ├── make-toc.xsl.html │ ├── theme.css │ ├── xmlspectrum.xsl.html │ ├── xq-handler.xsl.html │ ├── xq-spectrum.xsl.html │ ├── xslt-formatting-functions.xsl.html │ └── xslt-xpathlexer-functions.xsl.html ├── shell-cmd │ ├── javalog.log │ ├── readme.md │ ├── xmlspec.bat │ ├── xmlspec.log │ ├── xmlspec.sh │ ├── xslformat.bat │ ├── xslformat.sh │ ├── xslprint.bat │ └── xslprint.sh ├── testsh │ ├── output │ │ ├── sample.xml.html │ │ └── theme.css │ └── sample.xml ├── xmlspectrum-code │ ├── dummy.xsl.html │ ├── highlight-file.xsl.html │ ├── index.html │ ├── make-toc.xsl.html │ ├── sub │ │ ├── bigsub │ │ │ └── dummy3.xsl.html │ │ └── dummy2.xsl.html │ ├── theme.css │ └── xmlspectrum.xsl.html ├── xmlspectrum.xpr ├── xprint.sh ├── xproc │ ├── test.xpl │ └── test2.xpl ├── xq-spectrum.xsl └── xsl │ ├── basic-wrap.xsl │ ├── basic.xsl │ ├── data │ ├── color-themes.xml │ ├── doctypes.xml │ └── w3c-color-themes.xml │ ├── doctype-functions.xsl │ ├── highlight-file.xsl │ ├── highlight-inline.xsl │ ├── highlight-string.xsl │ ├── make-toc.xsl │ ├── output │ ├── highlight-file.xsl.html │ ├── sample.xml.html │ ├── sample.xml.text │ ├── test1.xsl.html │ └── theme.css │ ├── readme.md │ ├── sub │ ├── bigsub │ │ └── dummy3.xsl │ └── dummy2.xsl │ ├── trials │ ├── dummy.xsl │ ├── highlight-w3c-xquery-compressed.xsl │ ├── highlight-w3c-xquery.xsl │ └── w3c-xquery.xsl │ ├── xmlspectrum.xsl │ ├── xq-handler.xsl │ ├── xq-spectrum.xsl │ └── xslt-formatting-functions.xsl ├── gui-project ├── build.xml ├── docs │ ├── 404.html │ ├── images │ │ ├── apple-touch-icon-114x114.png │ │ ├── apple-touch-icon-72x72.png │ │ ├── apple-touch-icon.png │ │ ├── favicon.ico │ │ ├── micro-xms.png │ │ ├── mini-xms.png │ │ └── screenshot.png │ ├── index.html │ ├── javascripts │ │ └── tabs.js │ ├── readme.html │ ├── robots.txt │ └── stylesheets │ │ ├── base.css │ │ ├── layout.css │ │ └── skeleton.css ├── fonts │ └── SourceCodePro-Regular.ttf ├── manifest.mf ├── nbproject │ ├── UPDATED.TXT │ ├── build-impl.xml │ ├── configs │ │ ├── Run_as_WebStart.properties │ │ └── Run_in_Browser.properties │ ├── genfiles.properties │ ├── jfx-impl.xml │ ├── jfx-impl_backup.xml │ ├── jfx-impl_backup_1.xml │ ├── jfx-impl_backup_2.xml │ ├── jfx-impl_backup_3.xml │ ├── jfx-impl_backup_4.xml │ ├── jfx-impl_backup_5.xml │ ├── private │ │ ├── configs │ │ │ ├── Run_as_WebStart.properties │ │ │ └── Run_in_Browser.properties │ │ ├── private.properties │ │ └── private.xml │ ├── project.properties │ └── project.xml ├── notices │ ├── Saxon-notices │ │ ├── APACHE-ANT.txt │ │ ├── APACHE-RESOLVER.txt │ │ ├── APACHE-TAGSOUP.txt │ │ ├── APACHE-XERCES.txt │ │ ├── ASM.txt │ │ ├── CERN.txt │ │ ├── FRIJTERS.txt │ │ ├── GPL+CLASSPATH.txt │ │ ├── JAMESCLARK.txt │ │ ├── LEGAL.txt │ │ ├── LICENSE.txt │ │ ├── THAI.txt │ │ └── UNICODE.txt │ ├── SourceCodePro-LICENSE.txt │ └── XMLSpectrum-license.txt ├── output │ ├── theme.css │ └── xmlspectrum.xsl.html ├── readme.md ├── samples │ ├── formatting.xml │ ├── nolines.xml │ ├── schema-assert.xsd │ ├── search-ui.xqy │ ├── xpath-text.txt │ ├── xpathcolorer-x.xsl │ └── xproccorb.xpl ├── scripts │ └── xmlspectrum.bat ├── src │ └── webviewbrowser │ │ ├── FXListener.java │ │ ├── HTMLRender.java │ │ ├── RenderMessageListener.java │ │ ├── RenderingTask.java │ │ └── WebViewBrowser.java ├── xmlspectrum-fx-dist.zip └── xmlspectrum-icon.png ├── readme.md └── resources └── CeSample.zip /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ################# 2 | ## Eclipse 3 | ################# 4 | 5 | *.pydevproject 6 | .project 7 | .metadata 8 | bin/ 9 | tmp/ 10 | *.tmp 11 | *.bak 12 | *.swp 13 | *~.nib 14 | local.properties 15 | .classpath 16 | .settings/ 17 | .loadpath 18 | 19 | # External tool builders 20 | .externalToolBuilders/ 21 | 22 | # Locally stored "Eclipse launch configurations" 23 | *.launch 24 | 25 | # CDT-specific 26 | .cproject 27 | 28 | # PDT-specific 29 | .buildpath 30 | 31 | 32 | ################# 33 | ## Visual Studio 34 | ################# 35 | 36 | ## Ignore Visual Studio temporary files, build results, and 37 | ## files generated by popular Visual Studio add-ons. 38 | 39 | # User-specific files 40 | *.suo 41 | *.user 42 | *.sln.docstates 43 | 44 | # Build results 45 | [Dd]ebug/ 46 | [Rr]elease/ 47 | *_i.c 48 | *_p.c 49 | *.ilk 50 | *.meta 51 | *.obj 52 | *.pch 53 | *.pdb 54 | *.pgc 55 | *.pgd 56 | *.rsp 57 | *.sbr 58 | *.tlb 59 | *.tli 60 | *.tlh 61 | *.tmp 62 | *.vspscc 63 | .builds 64 | *.dotCover 65 | 66 | ## TODO: If you have NuGet Package Restore enabled, uncomment this 67 | #packages/ 68 | 69 | # Visual C++ cache files 70 | ipch/ 71 | *.aps 72 | *.ncb 73 | *.opensdf 74 | *.sdf 75 | 76 | # Visual Studio profiler 77 | *.psess 78 | *.vsp 79 | 80 | # ReSharper is a .NET coding add-in 81 | _ReSharper* 82 | 83 | # Installshield output folder 84 | [Ee]xpress 85 | 86 | # DocProject is a documentation generator add-in 87 | DocProject/buildhelp/ 88 | DocProject/Help/*.HxT 89 | DocProject/Help/*.HxC 90 | DocProject/Help/*.hhc 91 | DocProject/Help/*.hhk 92 | DocProject/Help/*.hhp 93 | DocProject/Help/Html2 94 | DocProject/Help/html 95 | 96 | # Click-Once directory 97 | publish 98 | 99 | # Others 100 | [Bb]in 101 | [Oo]bj 102 | sql 103 | TestResults 104 | *.Cache 105 | ClientBin 106 | stylecop.* 107 | ~$* 108 | *.dbmdl 109 | Generated_Code #added for RIA/Silverlight projects 110 | 111 | # Backup & report files from converting an old project file to a newer 112 | # Visual Studio version. Backup files are not needed, because we have git ;-) 113 | _UpgradeReport_Files/ 114 | Backup*/ 115 | UpgradeLog*.XML 116 | 117 | 118 | 119 | ############ 120 | ## Windows 121 | ############ 122 | 123 | # Windows image file caches 124 | Thumbs.db 125 | 126 | # Folder config file 127 | Desktop.ini 128 | 129 | 130 | ############# 131 | ## Python 132 | ############# 133 | 134 | *.py[co] 135 | 136 | # Packages 137 | *.egg 138 | *.egg-info 139 | dist 140 | build 141 | eggs 142 | parts 143 | bin 144 | var 145 | sdist 146 | develop-eggs 147 | .installed.cfg 148 | 149 | # Installer logs 150 | pip-log.txt 151 | 152 | # Unit test / coverage reports 153 | .coverage 154 | .tox 155 | 156 | #Translations 157 | *.mo 158 | 159 | #Mr Developer 160 | .mr.developer.cfg 161 | 162 | # Mac crap 163 | .DS_Store 164 | gui-project/nbproject/private/private.xml 165 | 166 | app/samples/xmsxsl-out/*.* 167 | 168 | app/shell-cmd/output/*.* 169 | 170 | *.xpr 171 | 172 | app/xsl/basic-xslver3.xsl 173 | 174 | app/shell-cmd/basic.sh 175 | 176 | app/output/theme.css 177 | 178 | app/samples/xms-out/nolines.xml.html 179 | 180 | output/theme.css 181 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright 2012 Philip Fearon - Qutoric Limited 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /app/dita-ot-175/theme.css: -------------------------------------------------------------------------------- 1 | 2 | @import url(http://fonts.googleapis.com/css?family=Source+Code+Pro); 3 | p.spectrum, pre.spectrum { 4 | 5 | margin:0px; 6 | font-family:'Source Code Pro', monospace; 7 | font-size: 0.8em; 8 | white-space: pre-wrap; 9 | display: block; 10 | border: none thin; 11 | border-color: #405075; 12 | background-color:#d5dee3; 13 | padding: 2px; 14 | margin-bottom:5px; 15 | 16 | } 17 | 18 | div.spectrum-toc { 19 | 20 | font-family:'Source Code Pro', monospace; 21 | font-size: 0.8em; 22 | display: block; 23 | border: none thin; 24 | border-color: #405075; 25 | background-color:#d5dee3; 26 | padding: 2px; 27 | 28 | } 29 | 30 | ul.base1, ul.spectrum-toc { 31 | color:#dd1144; 32 | } 33 | 34 | .spectrum span { 35 | white-space: pre-wrap; 36 | } 37 | 38 | span.ww {background-color: #ececec; } span.base01, span.eq-equ, span.z, span.sc, span.scx, span.ec, span.es, span.ez, span.atneq {color: #668B8B; } span.base03, span.ww:not(:hover), span.txt:not(:hover), span.cm:not(:hover), span.pi:not(:hover) {background-color: #d5dee3; } span.base0, span.txt, span.cd {color: #445588; } span.base1, span.literal {color: #dd1144; } span.yellow, span.op, span.type-op, span.if, span.higher, span.step, span.whitespace, span.quantifier {color: #1549b1; } span.orange, span.function, span.pname {color: #6876FF; } span.red, span.fname, span.tname {color: #DB7093; } span.magenta, span.vname, span.variable, span.external {color: #333333; } span.violet, span.qname, span.type-name, span.unclosed, span.en, span.cl, span.href, span.tcall {color: #990000; } span.blue, span.enxsl, span.clxsl, span.enx, span.filter, span.parenthesis, span.node {color: #445588; } span.cyan, span.atn, span.numeric, span.pi, span.dt, span.axis, span.context, span.bracedq {color: #008080; } span.green, span.cm, span.comment, span.av, span.type, span.node-type {color: #804080; } 39 | 40 | a.solar { 41 | text-decoration:none; 42 | } 43 | -------------------------------------------------------------------------------- /app/error.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pgfearo/xmlspectrum/b0332049441f0e574cd09592b24f591fd0a68233/app/error.txt -------------------------------------------------------------------------------- /app/msg.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pgfearo/xmlspectrum/b0332049441f0e574cd09592b24f591fd0a68233/app/msg.txt -------------------------------------------------------------------------------- /app/new-output/theme.css: -------------------------------------------------------------------------------- 1 | 2 | @import url(http://fonts.googleapis.com/css?family=Source+Code+Pro); 3 | p.spectrum, pre.spectrum { 4 | 5 | margin:0px; 6 | font-family:'Source Code Pro', monospace; 7 | font-size: 0.8em; 8 | white-space: pre-wrap; 9 | display: block; 10 | border: none thin; 11 | border-color: #405075; 12 | background-color:#002b36; 13 | padding: 2px; 14 | margin-bottom:5px; 15 | 16 | } 17 | 18 | div.spectrum-toc { 19 | 20 | font-family:'Source Code Pro', monospace; 21 | font-size: 0.8em; 22 | display: block; 23 | border: none thin; 24 | border-color: #405075; 25 | background-color:#002b36; 26 | padding: 2px; 27 | 28 | } 29 | 30 | ul.base1, ul.spectrum-toc { 31 | color:#93a1a1; 32 | } 33 | 34 | .spectrum span { 35 | white-space: pre-wrap; 36 | } 37 | 38 | span.ww {background-color: #073642; } span.base01, span.eq-equ, span.z, span.sc, span.scx, span.ec, span.es, span.ez, span.atneq {color: #586e75; } span.base03, span.ww:not(:hover), span.txt:not(:hover), span.cm:not(:hover), span.pi:not(:hover) {background-color: #002b36; } span.base0, span.txt, span.cd {color: #839496; } span.base1, span.literal {color: #93a1a1; } span.yellow, span.op, span.type-op, span.if, span.higher, span.step, span.whitespace, span.quantifier {color: #b58900; } span.orange, span.function, span.pname {color: #cb4b16; } span.red, span.fname, span.tname {color: #dc322f; } span.magenta, span.vname, span.variable, span.external {color: #d33682; } span.violet, span.qname, span.type-name, span.unclosed, span.en, span.cl, span.href, span.tcall {color: #6c71c4; } span.blue, span.enxsl, span.clxsl, span.enx, span.filter, span.parenthesis, span.node {color: #268bd2; } span.cyan, span.atn, span.numeric, span.pi, span.dt, span.axis, span.context, span.bracedq {color: #2aa198; } span.green, span.cm, span.comment, span.av, span.type, span.node-type {color: #859900; } 39 | 40 | a.solar { 41 | text-decoration:none; 42 | } 43 | -------------------------------------------------------------------------------- /app/output/VERSION.html: -------------------------------------------------------------------------------- 1 |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 2 | version='1.0'> 3 | 4 | <xsl:param name="VERSION" select="'2.0.0'"/> 5 | 6 | </xsl:stylesheet> 7 |
<xsl:stylesheet version="2.0" 2 | xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 3 | xmlns:xs="http://www.w3.org/2001/XMLSchema"> 4 | 5 | <xsl:template name="trx"> 6 | <xsl:value-of select="'trx'"/> 7 | </xsl:template> 8 | 9 | 10 | </xsl:stylesheet> 11 |
<abc> 2 | <def>this</def> 3 | <def> 4 | one tow 5 | three 6 | four 7 | </def> 8 | </abc>
<wrap xmlns:deltaxml="com.deltaxml"> 2 | <ap> the <b>brown fox</b> 3 | </ap> 4 | <bp> 5 | <i>the brown</i> fox 6 | </bp> 7 | <result> 8 | <p> 9 | <i deltaxml:deltaV2="A!=B" deltaxml:tagStart="B">the</i> 10 | <i deltaxml:deltaV2="A!=B" deltaxml:tagEnd="B"> 11 | <b deltaxml:tagStart="A">brown</b> 12 | </i> 13 | <b deltaxml:deltaV2="A!=B" deltaxml:tagEnd="A">fox</b> 14 | </p> 15 | 16 | </result> 17 | </wrap> 18 |
<wrap xmlns:deltaxml="com.deltaxml"> 2 | <ap> the <b>brown fox</b> 3 | </ap> 4 | <bp> 5 | <i>the brown</i> fox 6 | </bp> 7 | <result> 8 | <p> 9 | <i deltaxml:deltaV2="A!=B" deltaxml:tagStart="B">the</i> 10 | <i deltaxml:deltaV2="A!=B" deltaxml:tagEnd="B"> 11 | <b deltaxml:tagStart="A">brown</b> 12 | </i> 13 | <b deltaxml:deltaV2="A!=B" deltaxml:tagEnd="A">fox</b> 14 | </p> 15 | 16 | </result> 17 | </wrap> 18 |
XMLSpectrum: file not found 2 | samples/sample.xml 3 |
<xsl:stylesheet version="2.0" 2 | xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 3 | xmlns:xs="http://www.w3.org/2001/XMLSchema"> 4 | 5 | 6 | <xsl:template name="trz"> 7 | <xsl:value-of select="'trz'"/> 8 | </xsl:template> 9 | 10 | 11 | </xsl:stylesheet> 12 |
<xsl:stylesheet version="2.0" 2 | xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 3 | xmlns:xs="http://www.w3.org/2001/XMLSchema"> 4 | 5 | <xsl:import href="bigsub/dummy3.xsl"/> 6 | 7 | <xsl:template name="try"> 8 | <xsl:value-of select="'try'"/> 9 | </xsl:template> 10 | 11 | 12 | </xsl:stylesheet> 13 |
<xsl:template name="first"> 2 | <xsl:message expand-text="yes"> 3 | out: {$out} 4 | in: {$in} 5 | </xsl:message> 6 | </xsl:template> 7 |
<xsl:variable name="var1" as="xs:string" 2 | select="concat( 3 | 'one', 4 | 'two', 5 | 'three')"/> 6 | 7 | <xsl:variable name="var2" as="xs:string" select="concat( 8 | 'one', 9 | 'two', 10 | 'three')"/> 11 | 12 | <xsl:variable name="var3" select="concat( 13 | 'one', 14 | 'two', 15 | 'three')" 16 | as="xs:string"/> 17 | 18 | 19 | 20 |
if (empty($exclude)) 2 | then () 3 | else if ($exclude/@end) 4 | then 5 | $exclude/@end cast as xs:integer + 1 6 | else () 7 |
let $exclude := test/elements/"trick.com":element/let!$over return 2 | if (empty($exclude) and 'tre'||$t eq 'treat' and "trick.com":another) 3 | then () 4 | else if ($exclude/@end) 5 | then 6 | $exclude/@end cast as xs:integer + 1 7 | else () 8 |
let $increment := function($x as xs:integer) as xs:integer* { 2 | if ($x lt 10) then 3 | $x + 1, $fnb[22](24), $fna(28) 4 | else 5 | $x + 2, Q{http://example.com}div 6 | } return books/book/@title + $test 7 |
elements in an HTML file - use default dark theme
38 | Sample 8 Colorise XSLT, XSD and XPath embedded within elements in an HTML file - use light-theme
39 | Sample 9 Colorise and reformat XSLT file (the xmlspectrum source code) - use default dark theme
40 | Sample 10 Colorise and reformat a blog entry containing XSLT, XSD and XPath - use default dark theme
41 |
42 | 1. java -cp "C:\Saxon\saxon9he.jar" net.sf.saxon.Transform -t -it:main -xsl:xsl/highlight-file.xsl sourcepath=../samples/xpathcolorer-x.xsl
43 |
44 | 2. java -cp "C:\Saxon\saxon9he.jar" net.sf.saxon.Transform -t -it:main -xsl:xsl/highlight-file.xsl sourcepath=../samples/xpath-text.txt light-theme=no
45 |
46 | 3. java -cp "C:\Saxon\saxon9he.jar" net.sf.saxon.Transform -t -it:main -xsl:xsl/highlight-file.xsl sourcepath=../samples/schema-assert.xsd
47 |
48 | 4. java -cp "C:\Saxon\saxon9he.jar" net.sf.saxon.Transform -t -it:main -xsl:xsl/highlight-file.xsl sourcepath=../xsl/xmlspectrum.xsl indent=2
49 |
50 | 5. java -cp "C:\Saxon\saxon9he.jar" net.sf.saxon.Transform -t -it:main -xsl:xsl/highlight-file.xsl sourcepath=../xsl/highlight-file.xsl indent=2 `
51 | link-names=yes light-theme=yes output-path="new-output"
52 |
53 | 6. java -cp "C:\Saxon\saxon9he.jar" net.sf.saxon.Transform -t -it:main -xsl:xsl/highlight-file.xsl`
54 | sourcepath="C:\docbook-xslt2-2.0.0\xslt\base\html\docbook.xsl" indent=0 link-names=yes
55 |
56 | 7. java -cp "C:\Saxon\saxon9he.jar" net.sf.saxon.Transform -t -xsl:xsl/highlight-inline.xsl -s:samples/html-inline-sample.html -o:output/highlighted-inline.html
57 |
58 | 8. java -cp "C:\Saxon\saxon9he.jar" net.sf.saxon.Transform -t -xsl:xsl/highlight-inline.xsl -s:samples/html-inline-sample.html -o:output/highlighted-inline.html light-theme=yes
59 |
60 | 9. java -cp "C:\Saxon\saxon9he.jar" net.sf.saxon.Transform -t -xsl:xsl/highlight-inline.xsl -s:samples/badly-formatted-extract.html indent=2 auto-trim=yes -o:output/reformatted-extract.html
61 |
62 | 10. java -cp "C:\Saxon\saxon9he.jar" net.sf.saxon.Transform -t -xsl:xsl/highlight-inline.xsl -s:samples/blog-sample.html indent=2 -o:output/blog-sample.html
--------------------------------------------------------------------------------
/app/samples/badly-formatted-extract.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Transform Bad whitespace formatting
4 |
5 |
6 | The code
7 | Transform poorly formatted original
8 |
16 |
17 |
18 | War and Peace
19 |
20 |
21 |
22 |
23 |
24 |
25 |
29 |
30 | ]]>
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/app/samples/cdata-sample.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | The quick brown
2 |
3 |
4 | first para
5 | second para
6 |
7 |
8 | first para
9 | second para
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/samples/doc2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | second para
5 |
6 |
7 | first paragraph
8 | second para
9 | third para para
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/samples/format2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/app/samples/formatting.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
10 |
11 |
12 |
19 |
25 |
37 |
38 |
39 |
45 |
46 |
52 |
53 |
54 |
55 |
56 |
57 |
58 | the quic kbrown fox juod umpe ocver the lazy dog
59 | newer text now is the time for all good people to
60 | come to the aid
61 |
62 |
63 | one two three
64 | alpha bravo
65 | charlie delta
66 | echo
67 |
68 |
69 |
71 |
72 |
73 | This is a test
74 | of formatting
75 | in cdata
76 |
77 | ]]>
78 |
79 |
85 |
86 |
87 |
88 |
--------------------------------------------------------------------------------
/app/samples/javalog.log:
--------------------------------------------------------------------------------
1 | Saxon-PE 9.6.0.3J from Saxonica
2 | Java version 1.8.0_25
3 | Using license serial number V002689
4 | Stylesheet compilation time: 243.697252ms
5 | Processing file:/Users/philipfearon/Documents/github/xmlspectrum/app/samples/nolines.xml
6 | Using parser com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser
7 | Building tree for file:/Users/philipfearon/Documents/github/xmlspectrum/app/samples/nolines.xml using class net.sf.saxon.tree.tiny.TinyBuilder
8 | Tree built in 1.650801ms
9 | Tree size: 14 nodes, 61 characters, 1 attributes
10 | Execution time: 30.581732ms
11 | Memory used: 41467600
12 | NamePool contents: 8 entries in 8 chains. 6 URIs
13 |
--------------------------------------------------------------------------------
/app/samples/nolines.xml:
--------------------------------------------------------------------------------
1 | testing things are ok sometimes mixed doesn't show well
content
--------------------------------------------------------------------------------
/app/samples/notepad.xml:
--------------------------------------------------------------------------------
1 |
2 | this
3 |
4 | one tow
5 | three
6 | four
7 |
8 |
--------------------------------------------------------------------------------
/app/samples/output/sample.xml.html:
--------------------------------------------------------------------------------
1 | sample.xml XMLSpectrum: file not found
2 | sample.xml
3 |
--------------------------------------------------------------------------------
/app/samples/output/theme.css:
--------------------------------------------------------------------------------
1 |
2 | @import url(http://fonts.googleapis.com/css?family=Source+Code+Pro);
3 | body {
4 | margin:0;
5 | }
6 | p.spectrum, pre.spectrum {
7 |
8 | margin:0px;
9 | font-family:'Source Code Pro', Monaco, Consolas, 'Andale Mono', 'DejaVu Sans Mono', monospace;
10 | font-size: 0.8em;
11 | white-space: pre-wrap;
12 | display: block;
13 | border: none thin;
14 | border-color: #405075;
15 | background-color:#002b36;
16 | padding: 2px 2px 2px 5px;
17 | margin-bottom:5px;
18 |
19 | }
20 |
21 | div.spectrum-toc {
22 |
23 | font-family:'Source Code Pro', Monaco, Consolas, 'Andale Mono', 'DejaVu Sans Mono', monospace;
24 | font-size: 0.8em;
25 | display: block;
26 | border: none thin;
27 | border-color: #405075;
28 | background-color:#002b36;
29 | padding: 2px;
30 |
31 | }
32 |
33 | ul.base1, ul.spectrum-toc {
34 | color:#93a1a1;
35 | }
36 |
37 | ul.spectrum-toc > li {
38 | border-width:1px;
39 | border-top-style: solid;
40 | padding-bottom: 8px;
41 | }
42 | ul.spectrum-toc li {
43 | list-style: none;
44 | }
45 | ul.spectrum-toc span.blue {
46 | display:block;
47 | margin: 8px 0px 8px 0px;
48 | }
49 | ul.t-and-f {
50 |
51 | border-color: blue;
52 | float: left;
53 | }
54 | ul.v-and-p {
55 |
56 | border-color: red;
57 | float: left;
58 | }
59 |
60 | .spectrum span {
61 | white-space: pre-wrap;
62 | }
63 |
64 | span.ww
65 | {background-color: #073642; }
66 | span.base01, span.eq-equ, span.z, span.sc, span.scx, span.ec, span.es, span.ez, span.atneq
67 | {color: #586e75; }
68 | span.base03, span.ww:not(:hover), span.txt:not(:hover), span.cm:not(:hover), span.pi:not(:hover)
69 | {background-color: #002b36; }
70 | span.base0, span.txt, span.cd
71 | {color: #839496; }
72 | span.base1, span.literal
73 | {color: #93a1a1; }
74 | span.yellow, span.op, span.type-op, span.if, span.higher, span.step, span.whitespace, span.quantifier, span.parenthesis
75 | {color: #b58900; }
76 | span.orange, span.function, span.pname
77 | {color: #cb4b16; }
78 | span.red, span.fname, span.tname, span.tcall
79 | {color: #dc322f; }
80 | span.magenta, span.vname, span.variable, span.external
81 | {color: #d33682; }
82 | span.violet, span.qname, span.type-name, span.unclosed, span.en, span.cl, span.href
83 | {color: #6c71c4; }
84 | span.blue, span.enxsl, span.clxsl, span.enx, span.filter, span.node, span.node-type
85 | {color: #268bd2; }
86 | span.cyan, span.atn, span.numeric, span.pi, span.dt, span.axis, span.context, span.bracedq, span.property
87 | {color: #2aa198; }
88 | span.green, span.cm, span.comment, span.av, span.type
89 | {color: #859900; }
90 |
91 |
92 | a.solar {
93 | text-decoration:none;
94 | }
95 |
--------------------------------------------------------------------------------
/app/samples/pre.xml:
--------------------------------------------------------------------------------
1 | <top>
2 | <first>one</first>
3 | <first>
4 | <second>two</second>
5 | <second>three</second>
6 | </first>
7 | <first>four</first>
8 | </top>
--------------------------------------------------------------------------------
/app/samples/preserve.xml:
--------------------------------------------------------------------------------
1 |
2 | testing things are ok
3 | sometimes mixed doesn't show well
4 |
5 | the quick brown fox
6 | 10 20 30 40
7 | 20 800 90 550
8 |
9 |
10 |
11 | test
12 |
13 |
14 |
--------------------------------------------------------------------------------
/app/samples/sample2.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 | ]>
9 | mixed
13 |
14 | alsomixed
18 | -
19 |
20 |
Pride and >Prejudice
21 | the quick 'brown' 'only' fox jumped over
22 |
23 |
following
24 | following2
25 |
29 | 2002-12-31 tail
30 | English following3
31 | 8.95
32 |
36 |
39 | 187
40 | 0679601686
41 | very well
42 | 352
43 | 8.3 5.7 1.1
44 | 6.1
45 |
46 | -
47 |
Wuthering A Heights
48 | Charlotte Brontë
49 |
50 | There is somemixed text here
51 | how will this be preserved?
52 |
53 | Table New Dance Final
54 | 20 32 57 89
55 | 27 63 73 21
56 |
57 | Penguin Classics
58 | 2002-12-31
59 | English
60 | 5.30
61 | 113
62 | 0141439556
63 | 430
64 | 1.0 5.2 7.8
65 | 11.2
66 |
67 | -
68 |
Tess of the d'Urbervilles
69 | Thomas Hardy
70 | Bantam Classics
71 | 1984-05-01
72 | English
73 | 12.65
74 | 85
75 | 0553211684
76 | 480
77 | 6.8 4.2 0.8
78 | 7.7
79 |
80 | -
81 |
Jude the Obscure
82 | Thomas Hardy
83 | Penguin Classics
84 | 1998-09-01
85 | English
86 | 15.99
87 | 129
88 | 0140435387
89 | 528
90 | 7.8 5.2 0.9
91 | 10.9
92 |
93 | -
94 |
The Big Over Easy
95 | Jasper Fforde
96 | Hodder & Stoughton
97 | 2005-07-11
98 | English
99 | 7.50
100 | 129
101 | 0340835672
102 | 346
103 | 22.5 18.0 3.5
104 | 390
105 |
106 | -
107 |
The Eyre Affair
108 | Jasper Fforde
109 | Penguin
110 | 2003-02-25
111 | English
112 | 7.65
113 | 129
114 | 0142001805
115 | 384
116 | 7.8 5.0 0.9
117 | 9.0
118 |
119 | -
120 |
XSLT 2.0 Programmer's Reference
121 | Michael Kay
122 | Wrox
123 | 2004-10-13
124 | English
125 | 41.99
126 | 129
127 | 0470192747
128 | 1330
129 | 9.4 7.6 2.1
130 | 4.4
131 |
132 | -
133 |
XSLT Cookbook
134 | Sal Mangano
135 | O'Reilly
136 | 2005-12-14
137 | English
138 | 32.64
139 | 129
140 | 0596009747
141 | 784
142 | 9.2 7 1.4
143 | 2.5
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
--------------------------------------------------------------------------------
/app/samples/schema-assert.xsd:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
38 |
39 |
40 |
41 |
42 |
43 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/app/samples/schematron-nolines.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | An RSS version identifier should be supplied
6 |
7 |
8 | This Schematron validator is for RSS 0.91 only
9 |
10 |
11 | An RSS element can only contain a single channel element
12 |
13 |
14 |
15 |
16 |
17 | A element can only be contained with a
18 | channel, image, item or textinput element.
19 |
20 |
21 | A element cannot contain sub-elements,
22 | remove any additional markup
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/app/samples/schematron.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | An RSS version identifier should be supplied
8 |
9 |
10 | This Schematron validator is for RSS 0.91 only
11 |
12 |
13 | An RSS element can only contain a single channel element
14 |
15 |
16 |
17 |
18 |
20 | A element can only be contained with a
21 | channel, image, item or textinput element.
22 |
23 |
24 | A element cannot contain sub-elements,
25 | remove any additional markup
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/app/samples/titedoc.dita:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | The topic title
5 |
6 |
7 | Section title
8 |
9 | new section starts here
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/samples/top.xml:
--------------------------------------------------------------------------------
1 |
2 | one
3 |
4 | two
5 | three
6 |
7 | four
8 |
--------------------------------------------------------------------------------
/app/samples/tvt1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Processing id={$id}, step={$step}
5 |
6 | First name: {@first-name}
7 | Last name: {@last-name}
8 | Age: {@age}
9 |
10 |
11 |
12 | First name: {@first-name}
13 | Last name: {@last-name}
14 | Age: {@age}
15 |
16 |
17 |
18 |
First name: {@first-name}
19 |
Last name: {@last-name}
20 |
Age: {@age}
21 | this {@name}
22 |
23 |
24 | First name: {@first-name}
25 | Last name: {@last-name}
26 | this {@name}
27 | Age: {@age}
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/app/samples/xmlspec.log:
--------------------------------------------------------------------------------
1 | auto-trim: yes indent: 2
2 | output-path: /Users/philipfearon/Documents/github/xmlspectrum/app/samples/xms-out/xms-out document-type: dita root-prefix:
3 | input-uri file:///Users/philipfearon/Documents/github/xmlspectrum/app/samples/xms-out/nolines.xml indent-size 2
4 | document-type: dita rendering 3 dita tokens ...
5 | writing: file:///Users/philipfearon/Documents/github/xmlspectrum/app/samples/xms-out/xms-out/nolines.xml.html
6 | file: nolines.xml
7 | output-method html
8 | ---------------------------
9 | output file is at: /Users/philipfearon/Documents/github/xmlspectrum/app/samples/xms-out/xms-out/nolines.xml.html
10 |
--------------------------------------------------------------------------------
/app/samples/xms-out/doc1.xml.html:
--------------------------------------------------------------------------------
1 | doc1.xml <?xml version="1.0" encoding="utf-8"?>
2 | <document>
3 | <chapter id="1">
4 | <para>first para</para>
5 | <para new="yes">second para</para>
6 | </chapter>
7 | <chapter id="2">
8 | <para>first para</para>
9 | <para new="yes">second para</para>
10 | </chapter>
11 | </document>
12 |
--------------------------------------------------------------------------------
/app/samples/xms-out/theme.css:
--------------------------------------------------------------------------------
1 |
2 | @import url(http://fonts.googleapis.com/css?family=Source+Code+Pro);
3 | body {
4 | margin:0;
5 | }
6 | p.spectrum, pre.spectrum {
7 |
8 | margin:0px;
9 | font-family:'Source Code Pro', Monaco, Consolas, 'Andale Mono', 'DejaVu Sans Mono', monospace;
10 | font-size: 0.8em;
11 | white-space: pre-wrap;
12 | display: block;
13 | border: none thin;
14 | border-color: #405075;
15 | background-color:#FFFFFF;
16 | padding: 2px 2px 2px 5px;
17 | margin-bottom:5px;
18 |
19 | }
20 |
21 | div.spectrum-toc {
22 |
23 | font-family:'Source Code Pro', Monaco, Consolas, 'Andale Mono', 'DejaVu Sans Mono', monospace;
24 | font-size: 0.8em;
25 | display: block;
26 | border: none thin;
27 | border-color: #405075;
28 | background-color:#FFFFFF;
29 | padding: 2px;
30 |
31 | }
32 |
33 | ul.base1, ul.spectrum-toc {
34 | color:#1049a9;
35 | }
36 |
37 | ul.spectrum-toc > li {
38 | border-width:1px;
39 | border-top-style: solid;
40 | padding-bottom: 8px;
41 | }
42 | ul.spectrum-toc li {
43 | list-style: none;
44 | }
45 | ul.spectrum-toc span.blue {
46 | display:block;
47 | margin: 8px 0px 8px 0px;
48 | }
49 | ul.t-and-f {
50 |
51 | border-color: blue;
52 | float: left;
53 | }
54 | ul.v-and-p {
55 |
56 | border-color: red;
57 | float: left;
58 | }
59 |
60 | .spectrum span {
61 | white-space: pre-wrap;
62 | }
63 |
64 | span.ww
65 | {background-color: #FFFFFF; }
66 | span.base01, span.eq-equ, span.z, span.sc, span.scx, span.ec, span.es, span.ez, span.atneq
67 | {color: #006C51; }
68 | span.base03, span.ww:not(:hover), span.txt:not(:hover), span.cm:not(:hover), span.pi:not(:hover)
69 | {background-color: #FFFFFF; }
70 | span.base0, span.txt, span.cd
71 | {color: #00685A; }
72 | span.base1, span.literal
73 | {color: #1049a9; }
74 | span.yellow, span.op, span.type-op, span.if, span.higher, span.step, span.whitespace, span.quantifier, span.parenthesis
75 | {color: #534ed9; }
76 | span.orange, span.function, span.pname
77 | {color: #EC0033; }
78 | span.red, span.fname, span.tname, span.tcall
79 | {color: #a66b00; }
80 | span.magenta, span.vname, span.variable, span.external
81 | {color: #7608aa; }
82 | span.violet, span.qname, span.type-name, span.unclosed, span.en, span.cl, span.href
83 | {color: #4c036e; }
84 | span.blue, span.enxsl, span.clxsl, span.enx, span.filter, span.node, span.node-type
85 | {color: #052c6e; }
86 | span.cyan, span.atn, span.numeric, span.pi, span.dt, span.axis, span.context, span.bracedq, span.property
87 | {color: #920031; }
88 | span.green, span.cm, span.comment, span.av, span.type
89 | {color: #8a8a8a; }
90 |
91 |
92 | a.solar {
93 | text-decoration:none;
94 | }
95 |
--------------------------------------------------------------------------------
/app/samples/xpath-text.txt:
--------------------------------------------------------------------------------
1 | if (empty($exclude))
2 | then ()
3 | else if ($exclude/@end)
4 | then
5 | $exclude/@end cast as xs:integer + 1
6 | else ()
7 |
--------------------------------------------------------------------------------
/app/samples/xpath3.txt:
--------------------------------------------------------------------------------
1 | let $exclude := test/elements/"trick.com":element/let!$over return
2 | if (empty($exclude) and 'tre'||$t eq 'treat' and "trick.com":another)
3 | then ()
4 | else if ($exclude/@end)
5 | then
6 | $exclude/@end cast as xs:integer + 1
7 | else ()
8 |
--------------------------------------------------------------------------------
/app/samples/xpath4.txt:
--------------------------------------------------------------------------------
1 | let $increment := function($x as xs:integer) as xs:integer* {
2 | if ($x lt 10) then
3 | $x + 1, $fnb[22](24), $fna(28)
4 | else
5 | $x + 2, Q{http://example.com}div
6 | } return books/book/@title + $test
7 |
--------------------------------------------------------------------------------
/app/samples/xpath5.txt:
--------------------------------------------------------------------------------
1 | (
2 | if ($is-xml) then doc($corrected-uri)/* else (),
3 | abc/def * count(p),
4 | def/pre:* mod pqr,
5 | abc/def/*/child::agents,
6 | abc/def/*/agents,
7 | abc/def * mod / def,
8 | if ($is-xsl) then node-name($root-element) else ()
9 | )
10 |
--------------------------------------------------------------------------------
/app/samples/xquery/Untitled2.xquery:
--------------------------------------------------------------------------------
1 | if (true()) then else if (false()) then else
2 | {
3 | let $ab := function($n as element(new)) {5 + 5}
4 | return def + kbc[@name < testing ] + count(testing), if (true()) then else
5 | } testing {{@dev}}
6 |
7 |
--------------------------------------------------------------------------------
/app/samples/xquery/default.xqy:
--------------------------------------------------------------------------------
1 | xquery version "1.0" encoding "UTF-8";
2 |
3 | (:
4 | : Copyright (c)2006 Elsevier, Inc.
5 | :
6 | : Licensed under the Apache License, Version 2.0 (the "License");
7 | : you may not use this file except in compliance with the License.
8 | : You may obtain a copy of the License at
9 | :
10 | : http://www.apache.org/licenses/LICENSE-2.0
11 | :
12 | : Unless required by applicable law or agreed to in writing, software
13 | : distributed under the License is distributed on an "AS IS" BASIS,
14 | : WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | : See the License for the specific language governing permissions and
16 | : limitations under the License.
17 | :
18 | : The use of the Apache License does not indicate that this project is
19 | : affiliated with the Apache Software Foundation.
20 | :)
21 |
22 | (:~
23 | : This main module controls the presentation of the home page for
24 | : xqDoc. The home page will list all of the library and main modules
25 | : contained in the 'xqDoc' collection.
26 | : The mainline function invokes only the
27 | : method to generate the HTML for the xqDoc home page. A parameter of type
28 | : xs:boolean is passed to indicate whether links on the page should be constructed
29 | : to static HTML pages (for off-line viewing) or to XQuery scripts for dynamic
30 | : real-time viewing.
31 | :
32 | : @author Darin McBeath
33 | : @since June 9, 2006
34 | : @version 1.3
35 | :)
36 |
37 | import module namespace display="xqdoc/xqdoc-display" at "xqdoc-display.xqy";
38 |
39 |
40 | (: Disable caching and set content type :)
41 | xdmp:set-response-content-type("text/html"),
42 | xdmp:add-response-header("Pragma", "no-cache"),
43 | xdmp:add-response-header("Cache-Control", "no-cache"),
44 | xdmp:add-response-header("Expires", "0"),
45 |
46 | display:get-default-html(false())
47 |
48 |
--------------------------------------------------------------------------------
/app/samples/xquery/devtest.xql:
--------------------------------------------------------------------------------
1 | xquery version "1.0";
2 | (:
3 | : Module Name: Sample
4 | : Module Version: 1.0
5 | : Date: October 6, 2011
6 | :)
7 |
8 | (:~ so we have XPath 2.0 as default (:function namespace:) :)
9 | declare default function namespace "http://www.w3.org/2005/xpath-functions";
10 | (:~ this module outputs html :)
11 | declare default element namespace "http://www.w3.org/1999/xhtml";
12 |
13 | (:~ This variable contains the first variable to process. :)
14 | declare variable $operand-one as xs:integer external;
15 |
16 | (:~ This variable contains the second integer to process. :)
17 | declare variable $operand-two as xs:integer external;
18 |
19 | (:~
20 | : Generates title for html page
21 | :
22 | : -
23 | A list item and keywords 'and', 'some' + operators
24 | :
25 | : @returns string value for title
26 | :)
27 | declare function local:title() as xs:string{
28 | 'A Sample XQuery File'
29 | };
30 |
31 |
32 | declare function local:mytest() as xs:boolean
33 | {
34 | if (empty($operand-one))
35 | then false()
36 | else if ($operand-two eq 2)
37 | then
38 | $operand-two eq 3
39 | else false()
40 | };
41 |
42 | if (true()) then
43 |
44 |
45 |
46 | {local:title() (:my title:)}{local:mytest(), what {$operand-two, @fulltest@fullertest , string(@new), , string(@dev)} @difficulty } mixed text
47 | instruction?>
48 |
49 |
50 | {$operand-one + $operand-two}
51 | somewhat {testing}and div mod could be tricky/awkward]]>
52 |
53 |
54 | else
55 |
--------------------------------------------------------------------------------
/app/samples/xquery/get-code.xqy:
--------------------------------------------------------------------------------
1 | (:
2 | : Copyright (c)2006 Elsevier, Inc.
3 | :
4 | : Licensed under the Apache License, Version 2.0 (the "License");
5 | : you may not use this file except in compliance with the License.
6 | : You may obtain a copy of the License at
7 | :
8 | : http://www.apache.org/licenses/LICENSE-2.0
9 | :
10 | : Unless required by applicable law or agreed to in writing, software
11 | : distributed under the License is distributed on an "AS IS" BASIS,
12 | : WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | : See the License for the specific language governing permissions and
14 | : limitations under the License.
15 | :
16 | : The use of the Apache License does not indicate that this project is
17 | : affiliated with the Apache Software Foundation.
18 | :)
19 |
20 | (:~
21 | : This main module controls the presentation of the code for either
22 | : an entire mdoule or a particlur function within a module.
23 | : The mainline function invokes only the
24 | : method to retrieve the source code. The 'module' and 'function' parameters
25 | : are extracted from the query-string. If only a 'module' is specified, then
26 | : the source code for the entire module will be returned. If both a 'module'
27 | : and a 'function' are specified, only the source code for the specified function
28 | : within the module will be returned. A parameter of type xs:boolean
29 | : is passed to indicate whether links on the page should be constructed
30 | : to static HTML pages (for off-line viewing) or to XQuery scripts for dynamic
31 | : real-time viewing.
32 | :
33 | : @author Darin McBeath
34 | : @since June 9, 2006
35 | : @version 1.3
36 | :)
37 |
38 | import module namespace display="xqdoc/xqdoc-display" at "xqdoc-display.xqy";
39 |
40 | (: Disable caching and set content type :)
41 | xdmp:set-response-content-type("text/html"),
42 | xdmp:add-response-header("Pragma", "no-cache"),
43 | xdmp:add-response-header("Cache-Control", "no-cache"),
44 | xdmp:add-response-header("Expires", "0"),
45 |
46 | let $module := xdmp:get-request-field("module")
47 | let $function := xdmp:get-request-field("function")
48 | return
49 |
50 | display:get-code-html($module, $function, false())
51 |
52 |
53 |
--------------------------------------------------------------------------------
/app/samples/xquery/get-module.xqy:
--------------------------------------------------------------------------------
1 | (:
2 | : Copyright (c)2006 Elsevier, Inc.
3 | :
4 | : Licensed under the Apache License, Version 2.0 (the "License");
5 | : you may not use this file except in compliance with the License.
6 | : You may obtain a copy of the License at
7 | :
8 | : http://www.apache.org/licenses/LICENSE-2.0
9 | :
10 | : Unless required by applicable law or agreed to in writing, software
11 | : distributed under the License is distributed on an "AS IS" BASIS,
12 | : WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | : See the License for the specific language governing permissions and
14 | : limitations under the License.
15 | :
16 | : The use of the Apache License does not indicate that this project is
17 | : affiliated with the Apache Software Foundation.
18 | :)
19 |
20 | (:~
21 | : This main module controls the presentation of the xqDoc information
22 | : for the module.
23 | : The mainline function invokes only the
24 | : method to retrieve the xqDoc information for the specified 'module'. The 'module'
25 | : parameter is extracted from the query-string. A parameter of type xs:boolean
26 | : is passed to indicate whether links on the page should be constructed
27 | : to static HTML pages (for off-line viewing) or to XQuery scripts for dynamic
28 | : real-time viewing.
29 | :
30 | : @author Darin McBeath
31 | : @since June 9, 2006
32 | : @version 1.3
33 | :)
34 |
35 | import module namespace display="xqdoc/xqdoc-display" at "xqdoc-display.xqy";
36 |
37 | (: Disable caching and set content type :)
38 | xdmp:set-response-content-type("text/html"),
39 | xdmp:add-response-header("Pragma", "no-cache"),
40 | xdmp:add-response-header("Cache-Control", "no-cache"),
41 | xdmp:add-response-header("Expires", "0"),
42 |
43 | let $module := xdmp:get-request-field("module")
44 | return
45 |
46 | display:get-module-html($module, false())
47 |
48 |
49 |
--------------------------------------------------------------------------------
/app/samples/xquery/json.xqy:
--------------------------------------------------------------------------------
1 | xquery version "1.0-ml";
2 | module namespace json = "http://marklogic.com/json";
3 | (:~
4 | : Module Name: Sample Library Module
5 | : Module Version: 1.0
6 | : Date: October 6, 2011
7 | : Copyright: none
8 | : Proprietary XQuery Extensions Used: None
9 | : XQuery Specification: November 2005
10 | : Module Overview: This is a sample library module
11 | :
12 | : - Module introductory information
13 | : - Global variables declared in this module
14 | : - Modules imported by this module
15 | : - Summary information for each function defined in the module
16 | : - Detailed information for each function defined in the module
17 | :
18 | : @author Jim Fuller
19 | : @version 1.0
20 | :)
21 |
22 | declare namespace test="test";
23 |
24 | declare default function namespace "http://www.w3.org/2005/xpath-functions";
25 |
26 | declare variable $new-line-regex as xs:string := concat('[',codepoints-to-string((13, 10)),']+');
27 |
28 | (: Need to backslash escape any double quotes, backslashes, newlines and tabs :)
29 |
30 |
31 | (:~
32 | : Escapes json string managing newlines as well
33 | :
34 | : @param $s the json to be escaped
35 | : @return escaped json string
36 | :)
37 | declare function json:escape($s as xs:string) as xs:string {
38 | let $s := replace($s, "(\\|"")", "\\$1")
39 | let $s := replace($s, $new-line-regex, "\\n")
40 | let $s := replace($s, codepoints-to-string(9), "\\t")
41 | return $s
42 | };
43 |
44 | (: Print the thing that comes after the colon :)
45 | declare function json:print-value($x as element()) as xs:string {
46 | if (count($x/*) = 0) then
47 | json:atomize($x)
48 | else if ($x/@quote = "true") then
49 | concat('"', json:escape(xdmp:quote($x/node())), '"')
50 | else
51 | string-join(('{',
52 | string-join(for $i in $x/* return json:print-name-value($i), ","),
53 | '}'), "")
54 | };
55 |
56 | (: Print the name and value both :)
57 | declare function json:print-name-value($x as element()) as xs:string? {
58 | let $name := name($x)
59 | let $later-in-array := some $s in $x/following-sibling::* satisfies name($s) = $name
60 | return
61 | if ($later-in-array) then
62 | ()
63 | else
64 | ()
65 | };
66 |
67 | (:~
68 | : Transforms an XML element into a JSON string representation. See http://json.org.
69 | :
70 | : Sample usage:
71 | :
72 | : xquery version "1.0-ml";
73 | : import module namespace json="http://marklogic.com/json" at "json.xqy";
74 | : json:serialize(<foo><bar>kid</bar></foo>)
75 | :
76 | : Sample transformations:
77 | :
78 | : Namespace URIs are ignored. Namespace prefixes are included in the JSON name.
79 | :
80 | : Attributes are ignored, except for the special attribute @array="true" that
81 | : indicates the JSON serialization should write the node, even if single, as an
82 | : array, and the attribute @type that can be set to "boolean" or "number" to
83 | : dictate the value should be written as that type (unquoted). There's also
84 | : an @quote attribute that when set to true writes the inner content as text
85 | : rather than as structured JSON, useful for sending some XHTML over the
86 | : wire.
87 | :
88 | : Text nodes within mixed content are ignored.
89 | :
90 | : @param $x Element node to convert
91 | : @return String holding JSON serialized representation of $x
92 | :
93 | : @author Jason Hunter
94 | : @version 1.0.1
95 | :
96 | : Ported to xquery 1.0-ml; double escaped backslashes in json:escape
97 | :)
98 | declare function json:serialize($x as element()) as xs:string {
99 | string-join(('{', json:print-name-value($x), '}'), "")
100 | };
101 |
102 |
--------------------------------------------------------------------------------
/app/samples/xquery/nesting-prob.xq:
--------------------------------------------------------------------------------
1 | declare function display:print-modules($local as xs:boolean) as element()+
2 | {
3 | (
4 | {
5 | if (fn:exists(fn:collection($display:XQDOC_COLLECTION)/xq:xqdoc/xq:module[@type="library"])) then
6 | (Library Modules
,
7 |
,
,
8 | for $x in fn:collection($display:XQDOC_COLLECTION)/xq:xqdoc[xq:module/@type="library"]
9 | order by $x/xq:module/xq:uri
10 | return
11 | ( display:build-link("get-module",
12 | $local,
13 | (fn:string($x/xq:module/xq:uri)),
14 | display:decode-uri(fn:string($x/xq:module/xq:uri))),
15 |
)
16 | )
17 | else
18 | ()
19 | }
20 | {
21 | if (fn:exists(fn:collection($display:XQDOC_COLLECTION)/xq:xqdoc/xq:module[@type="main"])) then
22 | (Main Modules
,
23 |
,
,
24 | for $x in fn:collection($display:XQDOC_COLLECTION)/xq:xqdoc[xq:module/@type="main"]
25 | order by $x/xq:module/xq:uri
26 | return
27 | ( display:build-link("get-module",
28 | $local,
29 | (fn:string($x/xq:module/xq:uri)),
30 | display:decode-uri(xs:string($x/xq:module/xq:uri))),
31 |
)
32 | )
33 | else
34 | ()
35 | }
36 | )
37 | };
--------------------------------------------------------------------------------
/app/samples/xquery/sample.xqy:
--------------------------------------------------------------------------------
1 | (:
2 | : Module Name: Sample
3 | : Module Version: 1.0
4 | : Date: October 6, 2011
5 | : Copyright: None
6 | : Proprietary
7 | : Extensions: None
8 | :
9 | : XQuery
10 | : Specification : XQuery v1.0
11 | : Module Overview: Example for xqdoc processing
12 | :)
13 | xquery version "1.0";
14 |
15 |
16 | (:~ This module provides a sample main module authored according
17 | : to the proposed XQuery Style Guidelines
18 | : @author John Snelson
19 | : @since January 17, 2006
20 | : @version 1.0 :)
21 | import module namespace math="http://xqdoc.org/sample-math-lib" at "sample-math-lib.xqy";
22 |
23 | (:~ so we have XPath 2.0 as default function namespace :)
24 | declare default function namespace "http://www.w3.org/2005/xpath-functions";
25 | (:~ this module outputs html :)
26 | declare default element namespace "http://www.w3.org/1999/xhtml";
27 |
28 | (:~ This variable contains the first variable to process. :)
29 | declare variable $operand-one as xs:integer external;
30 |
31 | (:~ This variable contains the second integer to process. :)
32 | declare variable $operand-two as xs:integer external;
33 |
34 | (:~
35 | : Generates title for html page
36 | : @returns string value for title
37 | :)
38 | declare function local:title() as xs:string{
39 | 'A Sample XQuery File'
40 | };
41 |
42 |
43 |
44 | {local:title()}
45 |
46 |
47 | {$operand1 + $operand2}
48 |
49 |
50 |
--------------------------------------------------------------------------------
/app/samples/xslt3/shadow.xsl:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/samples/xslt3/test1.xsl:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 | othertest{here}
12 |
13 |
14 |
15 |
16 |
17 |
21 |
22 |
23 |
24 | some test
25 |
26 |
27 | this should also use xpath!
28 |
29 |
31 | Processing id={$id},
32 | step={let $x := 'test',
33 | let $a := function() {
34 | 22 + 55
35 | } return
36 | $a + 89
37 | $step
38 | }
39 | I can have {{any arrangement}}
40 | my test
41 |
42 |
43 |
44 | othertest{here}
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/app/samples/xslt3/test2.xsl:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 | othertest{here}
12 |
13 |
14 |
15 |
16 |
17 |
21 |
22 |
23 |
24 | some test
25 |
26 |
27 | this should also use xpath!
28 |
29 |
31 | Processing id={$id},
32 | sept= {
33 | let $a := function() {
34 | 22 + 55
35 | } return
36 | $a + 89
37 | $step
38 | }
39 | I can have {{any arrangement}}
40 |
41 | my test
42 |
43 |
44 |
45 | othertest{here}
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/app/samples/xslt3/test3.xsl:
--------------------------------------------------------------------------------
1 |
2 |
3 | out: {$out}
4 | in: {$in}
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/samples/xslt3/test4.xsl:
--------------------------------------------------------------------------------
1 |
6 |
7 |
11 |
12 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/app/samples/xslt3/xms-out/shadow.xsl.html:
--------------------------------------------------------------------------------
1 | shadow.xsl <xsl:param name="filter" static="yes"
2 | as="xs:string" select="'true()'"/>
3 | <xsl:include _href="common{$VERSION}.xsl"/>
4 | <xsl:function name="local:filter" as="xs:boolean">
5 | <xsl:param name="e" as="element(employee)"/>
6 | <xsl:sequence _select="$e/({$filter})"/>
7 | </xsl:function>
8 | <xsl:template match="/">
9 | <report>
10 | <xsl:apply-templates mode="report" select="//employee[local:filter(.)]"/>
11 | </report>
12 | </xsl:template>
--------------------------------------------------------------------------------
/app/samples/xslt3/xms-out/test4.xsl.html:
--------------------------------------------------------------------------------
1 | test4.xsl <xsl:variable name="var1" as="xs:string"
2 | select="concat(
3 | 'one',
4 | 'two',
5 | 'three')"/>
6 |
7 | <xsl:variable name="var2" as="xs:string" select="concat(
8 | 'one',
9 | 'two',
10 | 'three')"/>
11 |
12 | <xsl:variable name="var3" select="concat(
13 | 'one',
14 | 'two',
15 | 'three')"
16 | as="xs:string"/>
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/app/samples/xslt3/xms-out/theme.css:
--------------------------------------------------------------------------------
1 |
2 | @import url(http://fonts.googleapis.com/css?family=Source+Code+Pro);
3 | body {
4 | margin:0;
5 | }
6 | p.spectrum, pre.spectrum {
7 |
8 | margin:0px;
9 | font-family:'Source Code Pro', Monaco, Consolas, 'Andale Mono', 'DejaVu Sans Mono', monospace;
10 | font-size: 0.8em;
11 | white-space: pre-wrap;
12 | display: block;
13 | border: none thin;
14 | border-color: #405075;
15 | background-color:#002b36;
16 | padding: 2px 2px 2px 5px;
17 | margin-bottom:5px;
18 |
19 | }
20 |
21 | div.spectrum-toc {
22 |
23 | font-family:'Source Code Pro', Monaco, Consolas, 'Andale Mono', 'DejaVu Sans Mono', monospace;
24 | font-size: 0.8em;
25 | display: block;
26 | border: none thin;
27 | border-color: #405075;
28 | background-color:#002b36;
29 | padding: 2px;
30 |
31 | }
32 |
33 | ul.base1, ul.spectrum-toc {
34 | color:#93a1a1;
35 | }
36 |
37 | .spectrum span {
38 | white-space: pre-wrap;
39 | }
40 |
41 | span.ww {background-color: #073642; } span.base01, span.eq-equ, span.z, span.sc, span.scx, span.ec, span.es, span.ez, span.atneq {color: #586e75; } span.base03, span.ww:not(:hover), span.txt:not(:hover), span.cm:not(:hover), span.pi:not(:hover) {background-color: #002b36; } span.base0, span.txt, span.cd {color: #839496; } span.base1, span.literal {color: #93a1a1; } span.yellow, span.op, span.type-op, span.if, span.higher, span.step, span.whitespace, span.quantifier {color: #b58900; } span.orange, span.function, span.pname {color: #cb4b16; } span.red, span.fname, span.tname, span.tcall {color: #dc322f; } span.magenta, span.vname, span.variable, span.external {color: #d33682; } span.violet, span.qname, span.type-name, span.unclosed, span.en, span.cl, span.href {color: #6c71c4; } span.blue, span.enxsl, span.clxsl, span.enx, span.filter, span.parenthesis, span.node {color: #268bd2; } span.cyan, span.atn, span.numeric, span.pi, span.dt, span.axis, span.context, span.bracedq, span.property {color: #2aa198; } span.green, span.cm, span.comment, span.av, span.type, span.node-type {color: #859900; }
42 |
43 | a.solar {
44 | text-decoration:none;
45 | }
46 |
--------------------------------------------------------------------------------
/app/self-out/theme.css:
--------------------------------------------------------------------------------
1 |
2 | @import url(http://fonts.googleapis.com/css?family=Source+Code+Pro);
3 | p.spectrum, pre.spectrum {
4 |
5 | margin:0px;
6 | font-family:'Source Code Pro', monospace;
7 | font-size: 0.8em;
8 | white-space: pre-wrap;
9 | display: block;
10 | border: none thin;
11 | border-color: #405075;
12 | background-color:#002b36;
13 | padding: 2px;
14 | margin-bottom:5px;
15 |
16 | }
17 |
18 | div.spectrum-toc {
19 |
20 | font-family:'Source Code Pro', monospace;
21 | font-size: 0.8em;
22 | display: block;
23 | border: none thin;
24 | border-color: #405075;
25 | background-color:#002b36;
26 | padding: 2px;
27 |
28 | }
29 |
30 | ul.base1, ul.spectrum-toc {
31 | color:#93a1a1;
32 | }
33 |
34 | .spectrum span {
35 | white-space: pre-wrap;
36 | }
37 |
38 | span.ww {background-color: #073642; } span.base01, span.eq-equ, span.z, span.sc, span.scx, span.ec, span.es, span.ez, span.atneq {color: #586e75; } span.base03, span.ww:not(:hover), span.txt:not(:hover), span.cm:not(:hover), span.pi:not(:hover) {background-color: #002b36; } span.base0, span.txt, span.cd {color: #839496; } span.base1, span.literal {color: #93a1a1; } span.yellow, span.op, span.type-op, span.if, span.higher, span.step, span.whitespace, span.quantifier {color: #b58900; } span.orange, span.function, span.pname {color: #cb4b16; } span.red, span.fname, span.tname {color: #dc322f; } span.magenta, span.vname, span.variable, span.external {color: #d33682; } span.violet, span.qname, span.type-name, span.unclosed, span.en, span.cl, span.href, span.tcall {color: #6c71c4; } span.blue, span.enxsl, span.clxsl, span.enx, span.filter, span.parenthesis, span.node {color: #268bd2; } span.cyan, span.atn, span.numeric, span.pi, span.dt, span.axis, span.context, span.bracedq {color: #2aa198; } span.green, span.cm, span.comment, span.av, span.type, span.node-type {color: #859900; }
39 |
40 | a.solar {
41 | text-decoration:none;
42 | }
43 |
--------------------------------------------------------------------------------
/app/shell-cmd/javalog.log:
--------------------------------------------------------------------------------
1 | Saxon-PE 9.6.0.3J from Saxonica
2 | Java version 1.8.0_25
3 | Using license serial number V002689
4 | Stylesheet compilation time: 195.07931ms
5 | Processing file:/Users/philipfearon/Documents/github/xmlspectrum/app/samples/globals.xml
6 | Using parser com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser
7 | Building tree for file:/Users/philipfearon/Documents/github/xmlspectrum/app/samples/globals.xml using class net.sf.saxon.tree.tiny.TinyBuilder
8 | Tree built in 6.558551ms
9 | Tree size: 576 nodes, 3382 characters, 7 attributes
10 | Execution time: 38.018696ms
11 | Memory used: 38790064
12 | NamePool contents: 10 entries in 10 chains. 7 URIs
13 |
--------------------------------------------------------------------------------
/app/shell-cmd/readme.md:
--------------------------------------------------------------------------------
1 | Sample shell scripts and batch files to simplify driving xmlspectrum.xsl from the command line
2 |
--------------------------------------------------------------------------------
/app/shell-cmd/xmlspec.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 | REM script for calling xmlspectrum with command line such as: xmlspec sample.xml auto-trim=yes indent=2
3 | REM loop is required to combine name/value pairs with an '=' as args are split as they are passed to CMD
4 | set source=%~f1
5 | set xslpath=%~dp0\..\xsl\highlight-file.xsl
6 | set opath=%CD%\xms-out
7 | set ofpath=%~nx1.html
8 | set fullofpath=%opath%\%ofpath%
9 | shift
10 | set iter=0
11 | set prev=
12 | set cmd=
13 | set current=%1
14 | :loop
15 | shift
16 | if [%1]==[] goto afterloop
17 | set prev=%current%
18 | set current=%1
19 | set /a "iter=%iter%+1"
20 | set /a "mod=%iter%%%2
21 | if [%mod%]==[1] set cmd=%cmd% %prev%=%current%
22 | goto loop
23 | :afterloop
24 | echo args: %cmd%
25 | java -cp "%SAXON_HOME%\saxon9he.jar" net.sf.saxon.Transform -xsl:%xslpath% -it:main sourcepath=%source% output-path=%opath%%cmd%
26 | start %fullofpath%
27 |
--------------------------------------------------------------------------------
/app/shell-cmd/xmlspec.log:
--------------------------------------------------------------------------------
1 | auto-trim: yes indent: 2
2 | output-path: /Users/philipfearon/Documents/github/xmlspectrum/app/samples/xms-out/xms-out document-type: xslt root-prefix:
3 | input-uri file:///Users/philipfearon/Documents/github/xmlspectrum/app/samples/xms-out/globals.xml
4 | document-type: xslt rendering 398 xslt tokens ...
5 | writing: file:///Users/philipfearon/Documents/github/xmlspectrum/app/samples/xms-out/xms-out/globals.xml.html
6 | file: globals.xml
7 | output-method html
8 | ---------------------------
9 | output file is at: /Users/philipfearon/Documents/github/xmlspectrum/app/samples/xms-out/xms-out/globals.xml.html
10 |
--------------------------------------------------------------------------------
/app/shell-cmd/xmlspec.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # syntax-highlight and color source code file for:
4 | # xslt xquery xpath xsd schematron xproc
5 | #
6 | # requires Saxon XSLT 2.0 processor from http://saxonica.com (replace SAXONJAR below)
7 |
8 | SAXONJAR=$SAXON_HOME_JAR
9 | # entry point is XMLSpectrum's highlight-file xsl stylesheet:
10 | XMLSPECTRUM=$(dirname $0)/../xsl/highlight-file.xsl
11 |
12 | # this script resolves relative paths in the sourcepath based on the current directory
13 | # that the script is called from - not necessarily the script path
14 |
15 | # first arg must be the source file path
16 | # run script with no args to get full usage (returned by highllight-file.xsl)
17 |
18 | if [[ $# -eq 0 ]]
19 | then
20 | echo "no source file name"
21 | elif [[ $1 == '-?' ]]
22 | then
23 | :
24 | elif [[ $1 == /* ]]
25 | then
26 | relpath=$1
27 | filename=$(basename $1)
28 | else
29 | tmppath=$(pwd)/$1
30 | filename=$(basename $1)
31 | dirpath=$(dirname $tmppath)
32 | relpath="$(cd "$dirpath" && pwd)/$filename"
33 | fi
34 |
35 | if [[ $# -eq 0 || $1 == '-?' ]]
36 | then
37 | echo "XMLSpectrum: code higlighter and formatter"
38 | echo ""
39 | echo "Usage:"
40 | echo "xmlspec.sh source_file_path [params]"
41 | echo "params: param=value"
42 | java -jar $SAXONJAR -xsl:$XMLSPECTRUM -it:main sourcepath=?
43 | elif [ -f "$relpath" ]
44 | then
45 | newpath=$(dirname $relpath)/xms-out
46 | java -jar $SAXONJAR -xsl:$XMLSPECTRUM -it:main sourcepath=$relpath output-path=$newpath $2 $3 $4 $5 $6 $7 $8 $9
47 | newfilepath=$newpath/$filename.html
48 | open $newfilepath
49 | echo "---------------------------"
50 | echo "output file is at: $newfilepath"
51 | else
52 | echo "file not found: $relpath"
53 | fi
--------------------------------------------------------------------------------
/app/shell-cmd/xslformat.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 | REM script for calling xmlspectrum with command line such as: xmlspec sample.xml auto-trim=yes indent=2
3 | REM loop is required to combine name/value pairs with an '=' as args are split as they are passed to CMD
4 | set source=%~f1
5 | set xslpath=%~dp0\..\xsl\highlight-file.xsl
6 | set opath=%CD%\xms-out
7 | set ofpath=%~nx1.text
8 | set fullofpath=%opath%\%ofpath%
9 | shift
10 | set iter=0
11 | set prev=
12 | set cmd=
13 | set current=%1
14 | :loop
15 | shift
16 | if [%1]==[] goto afterloop
17 | set prev=%current%
18 | set current=%1
19 | set /a "iter=%iter%+1"
20 | set /a "mod=%iter%%%2
21 | if [%mod%]==[1] set cmd=%cmd% %prev%=%current%
22 | goto loop
23 | :afterloop
24 | java -cp "%SAXON_HOME%\saxon9he.jar" net.sf.saxon.Transform -xsl:%xslpath% -it:main sourcepath=%source% output-method=text output-path=%opath%%cmd%
25 | type %fullofpath%
26 | echo -----------------------
27 | echo args: %cmd%
28 | echo written to: %fullofpath%
29 |
--------------------------------------------------------------------------------
/app/shell-cmd/xslformat.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # produces xml text file with any formatting supplied
4 | # as arguments: eg. indent, force-newline, auto-trim
5 | # and format-mixed-content
6 | #
7 | # requires Saxon XSLT 2.0 processor (replace SAXONJAR below)
8 |
9 | SAXONJAR=$SAXON_HOME_JAR
10 | # entry point is XMLSpectrum's highlight-file xsl stylesheet:
11 | XMLSPECTRUM=$(dirname $0)/../xsl/highlight-file.xsl
12 |
13 | # first arg must be the source file path
14 |
15 | if [[ $# -eq 0 ]]
16 | then
17 | echo "no source file name"
18 | elif [[ $1 == '-?' ]]
19 | then
20 | :
21 | elif [[ $1 == /* ]]
22 | then
23 | relpath=$1
24 | filename=$(basename $1)
25 | else
26 | tmppath=$(pwd)/$1
27 | filename=$(basename $1)
28 | dirpath=$(dirname $tmppath)
29 | relpath="$(cd "$dirpath" && pwd)/$filename"
30 | fi
31 |
32 | if [[ $# -eq 0 || $1 == '-?' ]]
33 | then
34 | echo "XMLSpectrum: xml formatter script"
35 | echo ""
36 | echo "Usage:"
37 | echo "xslformat.sh source_file_path [params]"
38 | echo "params: param=value"
39 | java -jar $SAXONJAR -xsl:$XMLSPECTRUM -it:main sourcepath=?
40 | elif [ -f $relpath ]
41 | then
42 | newpath=$(dirname $relpath)/xmsxsl-out
43 | java -jar $SAXONJAR -xsl:$XMLSPECTRUM -it:main sourcepath=$relpath output-path=$newpath output-method=text $2 $3 $4 $5 $6 $7 $8 $9
44 | newfilepath=$newpath/$filename.text
45 | echo
46 | echo "---------------------------"
47 | cat $newfilepath
48 | echo "---------------------------"
49 | echo "output file is at: $newfilepath"
50 | else
51 | echo "file not found: $relpath"
52 | fi
--------------------------------------------------------------------------------
/app/shell-cmd/xslprint.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 | REM script for calling xmlspectrum with command line such as: xmlspec sample.xml auto-trim=yes indent=2
3 | REM loop is required to combine name/value pairs with an '=' as args are split as they are passed to CMD
4 | set source=%~f1
5 | set xslpath=%~dp0\..\xsl\highlight-file.xsl
6 | set opath=%CD%\xms-out
7 | set fullofpath=%opath%\index.html
8 | shift
9 | set iter=0
10 | set prev=
11 | set cmd=
12 | set current=%1
13 | :loop
14 | shift
15 | if [%1]==[] goto afterloop
16 | set prev=%current%
17 | set current=%1
18 | set /a "iter=%iter%+1"
19 | set /a "mod=%iter%%%2
20 | if [%mod%]==[1] set cmd=%cmd% %prev%=%current%
21 | goto loop
22 | :afterloop
23 | echo args: %cmd%
24 | java -cp "%SAXON_HOME%\saxon9he.jar" net.sf.saxon.Transform -xsl:%xslpath% -it:main sourcepath=%source% link-names=yes output-path=%opath%%cmd%
25 | start %fullofpath%
26 |
--------------------------------------------------------------------------------
/app/shell-cmd/xslprint.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # syntax-highlight and color source code files for
4 | # xslt produces also an index html page with hyperlinks
5 | # for global templates, functions and params/variables
6 | #
7 | # requires Saxon XSLT 2.0 processor (replace SAXONJAR below)
8 |
9 | SAXONJAR=$SAXON_HOME_JAR
10 | # entry point is XMLSpectrum's highlight-file xsl stylesheet:
11 | XMLSPECTRUM=$(dirname $0)/../xsl/highlight-file.xsl
12 |
13 | # first arg must be the source file path
14 |
15 | if [[ $# -eq 0 ]]
16 | then
17 | echo "no source file name"
18 | elif [[ $1 == '-?' ]]
19 | then
20 | :
21 | elif [[ $1 == /* ]]
22 | then
23 | relpath=$1
24 | filename=$(basename $1)
25 | else
26 | tmppath=$(pwd)/$1
27 | filename=$(basename $1)
28 | dirpath=$(dirname $tmppath)
29 | relpath="$(cd "$dirpath" && pwd)/$filename"
30 | fi
31 |
32 | if [[ $# -eq 0 || $1 == '-?' ]]
33 | then
34 | echo "XMLSpectrum: code higlighter and formatter"
35 | echo ""
36 | echo "Usage:"
37 | echo "xslprint.sh source_file_path [params]"
38 | echo "params: param=value"
39 | java -jar $SAXONJAR -xsl:$XMLSPECTRUM -it:main sourcepath=?
40 | elif [ -f $relpath ]
41 | then
42 | newpath=$(dirname $relpath)/xmsxsl-out
43 | java -jar $SAXONJAR -xsl:$XMLSPECTRUM -it:main sourcepath=$relpath output-path=$newpath link-names=yes $2 $3 $4 $5 $6 $7 $8 $9
44 | newfilepath=$newpath/index.html
45 | open $newfilepath
46 | echo "-----------------------------"
47 | echo "module toc output to $newfilepath"
48 | else
49 | echo "file not found: $relpath"
50 | fi
--------------------------------------------------------------------------------
/app/testsh/output/theme.css:
--------------------------------------------------------------------------------
1 |
2 | @import url(http://fonts.googleapis.com/css?family=Source+Code+Pro);
3 | p.spectrum, pre.spectrum {
4 |
5 | margin:0px;
6 | font-family:'Source Code Pro', Monaco, Consolas, 'Andale Mono', 'DejaVu Sans Mono', monospace;
7 | font-size: 0.8em;
8 | white-space: pre-wrap;
9 | display: block;
10 | border: none thin;
11 | border-color: #405075;
12 | background-color:#ffffff;
13 | padding: 2px;
14 | margin-bottom:5px;
15 |
16 | }
17 |
18 | div.spectrum-toc {
19 |
20 | font-family:'Source Code Pro', Monaco, Consolas, 'Andale Mono', 'DejaVu Sans Mono', monospace;
21 | font-size: 0.8em;
22 | display: block;
23 | border: none thin;
24 | border-color: #405075;
25 | background-color:#ffffff;
26 | padding: 2px;
27 |
28 | }
29 |
30 | ul.base1, ul.spectrum-toc {
31 | color:#dd1144;
32 | }
33 |
34 | .spectrum span {
35 | white-space: pre-wrap;
36 | }
37 |
38 | span.ww {background-color: #ececec; } span.base01, span.eq-equ, span.z, span.sc, span.scx, span.ec, span.es, span.ez, span.atneq {color: #924F99; } span.base03, span.ww:not(:hover), span.txt:not(:hover), span.cm:not(:hover), span.pi:not(:hover) {background-color: #ffffff; } span.base0, span.txt, span.cd {color: #445588; } span.base1, span.literal {color: #dd1144; } span.yellow, span.op, span.type-op, span.if, span.higher, span.step, span.whitespace, span.quantifier {color: #1549b1; } span.orange, span.function, span.pname {color: #885d3b; } span.red, span.fname, span.tname, span.tcall {color: #DB7093; } span.magenta, span.vname, span.variable, span.external {color: #333333; } span.violet, span.qname, span.type-name, span.unclosed, span.en, span.cl, span.href {color: #990000; } span.blue, span.enxsl, span.clxsl, span.enx, span.filter, span.parenthesis, span.node {color: #445588; } span.cyan, span.atn, span.numeric, span.pi, span.dt, span.axis, span.context, span.bracedq {color: #008080; } span.green, span.cm, span.comment, span.av, span.type, span.node-type {color: #999988; }
39 |
40 | a.solar {
41 | text-decoration:none;
42 | }
43 |
--------------------------------------------------------------------------------
/app/xmlspectrum-code/dummy.xsl.html:
--------------------------------------------------------------------------------
1 | dummy.xsl <xsl:stylesheet version="2.0"
2 | xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3 | xmlns:xs="http://www.w3.org/2001/XMLSchema">
4 |
5 | <xsl:template name="trx">
6 | <xsl:value-of select="'trx'"/>
7 | </xsl:template>
8 |
9 |
10 | </xsl:stylesheet>
11 |
--------------------------------------------------------------------------------
/app/xmlspectrum-code/sub/bigsub/dummy3.xsl.html:
--------------------------------------------------------------------------------
1 | dummy3.xsl <xsl:stylesheet version="2.0"
2 | xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3 | xmlns:xs="http://www.w3.org/2001/XMLSchema">
4 |
5 |
6 | <xsl:template name="trz">
7 | <xsl:value-of select="'trz'"/>
8 | </xsl:template>
9 |
10 |
11 | </xsl:stylesheet>
12 |
--------------------------------------------------------------------------------
/app/xmlspectrum-code/sub/dummy2.xsl.html:
--------------------------------------------------------------------------------
1 | dummy2.xsl <xsl:stylesheet version="2.0"
2 | xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3 | xmlns:xs="http://www.w3.org/2001/XMLSchema">
4 |
5 | <xsl:import href="bigsub/dummy3.xsl"/>
6 |
7 | <xsl:template name="try">
8 | <xsl:value-of select="'try'"/>
9 | </xsl:template>
10 |
11 |
12 | </xsl:stylesheet>
13 |
--------------------------------------------------------------------------------
/app/xmlspectrum-code/theme.css:
--------------------------------------------------------------------------------
1 |
2 | @import url(http://fonts.googleapis.com/css?family=Source+Code+Pro);
3 | p.spectrum {
4 | margin:0px;
5 | font-family: 'Source Code Pro', monospace;
6 | font-size: 0.8em;
7 | white-space: pre-wrap;
8 | display: block;
9 | border: none thin;
10 | border-color: #405075;
11 | background-color:#002b36;
12 | padding: 2px;
13 | margin-bottom:5px;
14 | }
15 |
16 | div.spectrum-toc {
17 | font-family: 'Source Code Pro', monospace;
18 | font-size: 0.8em;
19 | display: block;
20 | border: none thin;
21 | border-color: #405075;
22 | background-color: #002b36;
23 | padding: 2px;
24 | }
25 |
26 | ul.base1, ul.spectrum-toc {
27 | color:#93a1a1;
28 | }
29 |
30 | .spectrum span {
31 | white-space: pre-wrap;
32 | }
33 | /*
34 | chosen theme background: dark;
35 |
36 | $base03: #002b36; //background
37 | $base02: #073642; //highlighted-background
38 | $base01: #586e75;
39 | $base00: #657b83;
40 | $base0: #839496;
41 | $base1: #93a1a1;
42 | $base2: #eee8d5; //highlighted-background
43 | $base3: #fdf6e3; //background
44 | $yellow: #b58900;
45 | $orange: #cb4b16;
46 | $red: #dc322f;
47 | $magenta: #d33682;
48 | $violet: #6c71c4;
49 | $blue: #268bd2;
50 | $cyan: #2aa198;
51 | $green: #859900;
52 | */
53 |
54 | /* solorized colors */
55 | span.base03 {
56 | color: #002b36;
57 | }
58 | span.base02 {
59 | color: #073642;
60 | }
61 |
62 | /* hover-effect [start] */
63 | span.base03, span.ww:not(:hover), span.txt:not(:hover), span.cm:not(:hover), span.pi:not(:hover) {
64 | background-color: #002b36;
65 | }
66 | span.ww {
67 | background-color: #00202e;
68 | }
69 | /* hover-effect [end] */
70 |
71 | span.base01, span.eq-equ, span.z, span.sc, span.scx, span.ec, span.es, span.ez, span.atneq {
72 | color: #586e75;
73 | }
74 | span.base00 {
75 | color: #657b83;
76 | }
77 | span.base0, span.txt, span.cd {
78 | color: #839496;
79 | }
80 | span.base1, span.literal, span.av {
81 | color:#93a1a1;
82 | }
83 | span.base2 {
84 | color: #eee8d5;
85 | }
86 | span.base3 {
87 | color: #fdf6e3;
88 | }
89 | span.yellow, span.op, span.type-op, span.if, span.higher, span.step {
90 | color: #b58900;
91 | }
92 | span.orange, span.type, span.node-type, span.function {
93 | color: #cb4b16;
94 | }
95 | span.red, span.fname, span.tname {
96 | color: #dc322f;
97 | }
98 | span.magenta, span.vname, span.variable, span.external {
99 | color: #d33682;
100 | }
101 | span.violet, span.qname, span.type-name, span.unclosed, span.en, span.cl, span.href, span.tcall {
102 | color: #6c71c4;
103 | }
104 | span.blue, span.enxsl, span.clxsl, span.enx,
105 | span.filter, span.parenthesis, span.node{
106 | color: #268bd2;
107 | }
108 | span.cyan, span.atn, span.numeric, span.pi, span.dt, span.axis, span.context {
109 | color: #2aa198;
110 | }
111 | span.green, span.cm, span.comment {
112 | color: #859900;
113 | }
114 | a.solar {
115 | text-decoration:none;
116 | }
117 |
--------------------------------------------------------------------------------
/app/xmlspectrum.xpr:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | enable.project.master.files.support
10 | true
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/app/xprint.sh:
--------------------------------------------------------------------------------
1 | #!bin/bash
2 |
3 |
--------------------------------------------------------------------------------
/app/xproc/test.xpl:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/app/xproc/test2.xpl:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/app/xsl/basic-wrap.xsl:
--------------------------------------------------------------------------------
1 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/app/xsl/basic.xsl:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/app/xsl/doctype-functions.xsl:
--------------------------------------------------------------------------------
1 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
21 |
22 |
23 |
24 |
25 |
27 |
28 |
29 |
30 |
31 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
--------------------------------------------------------------------------------
/app/xsl/highlight-string.xsl:
--------------------------------------------------------------------------------
1 |
2 |
3 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/app/xsl/output/theme.css:
--------------------------------------------------------------------------------
1 |
2 | @import url(http://fonts.googleapis.com/css?family=Source+Code+Pro);
3 | body {
4 | margin:0;
5 | }
6 | p.spectrum, pre.spectrum {
7 |
8 | margin:0px;
9 | font-family:'Source Code Pro', Monaco, Consolas, 'Andale Mono', 'DejaVu Sans Mono', monospace;
10 | font-size: 0.8em;
11 | white-space: pre-wrap;
12 | display: block;
13 | border: none thin;
14 | border-color: #405075;
15 | background-color:#ffffff;
16 | padding: 2px 2px 2px 5px;
17 | margin-bottom:5px;
18 |
19 | }
20 |
21 | div.spectrum-toc {
22 |
23 | font-family:'Source Code Pro', Monaco, Consolas, 'Andale Mono', 'DejaVu Sans Mono', monospace;
24 | font-size: 0.8em;
25 | display: block;
26 | border: none thin;
27 | border-color: #405075;
28 | background-color:#ffffff;
29 | padding: 2px;
30 |
31 | }
32 |
33 | ul.base1, ul.spectrum-toc {
34 | color:red;
35 | }
36 | ul.t-and-f {
37 | background-color: blue;
38 | border-style: solid;
39 | border-width: 2px;
40 | border-color: white;
41 | }
42 | .v-and-p {
43 | background-color: red;
44 | }
45 |
46 | .spectrum span {
47 | white-space: pre-wrap;
48 | }
49 |
50 | span.ww {background-color: #ececec; } span.base01, span.eq-equ, span.z, span.sc, span.scx, span.ec, span.es, span.ez, span.atneq {color: #924F99; } span.base03, span.ww:not(:hover), span.txt:not(:hover), span.cm:not(:hover), span.pi:not(:hover) {background-color: #ffffff; } span.base0, span.txt, span.cd {color: #445588; } span.base1, span.literal {color: #dd1144; } span.yellow, span.op, span.type-op, span.if, span.higher, span.step, span.whitespace, span.quantifier {color: #1549b1; } span.orange, span.function, span.pname {color: #885d3b; } span.red, span.fname, span.tname, span.tcall {color: #DB7093; } span.magenta, span.vname, span.variable, span.external {color: #333333; } span.violet, span.qname, span.type-name, span.unclosed, span.en, span.cl, span.href {color: #990000; } span.blue, span.enxsl, span.clxsl, span.enx, span.filter, span.parenthesis, span.node {color: #445588; } span.cyan, span.atn, span.numeric, span.pi, span.dt, span.axis, span.context, span.bracedq {color: #008080; } span.green, span.cm, span.comment, span.av, span.type, span.node-type {color: #999988; }
51 |
52 | a.solar {
53 | text-decoration:none;
54 | }
55 |
--------------------------------------------------------------------------------
/app/xsl/sub/bigsub/dummy3.xsl:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/xsl/sub/dummy2.xsl:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/app/xsl/trials/dummy.xsl:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/app/xsl/trials/highlight-w3c-xquery.xsl:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/app/xsl/trials/w3c-xquery.xsl:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/gui-project/build.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | Builds, tests, and runs the project WebViewBrowser.
12 |
13 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
--------------------------------------------------------------------------------
/gui-project/docs/404.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
10 |
11 | Your Page Title Here :)
12 |
13 |
14 |
17 |
18 |
20 |
21 |
22 |
24 |
25 |
26 |
27 |
28 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
40 |
41 | Sorry. Couldn't Find That Page!
42 |
43 |
44 |
46 |
47 |
--------------------------------------------------------------------------------
/gui-project/docs/images/apple-touch-icon-114x114.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pgfearo/xmlspectrum/b0332049441f0e574cd09592b24f591fd0a68233/gui-project/docs/images/apple-touch-icon-114x114.png
--------------------------------------------------------------------------------
/gui-project/docs/images/apple-touch-icon-72x72.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pgfearo/xmlspectrum/b0332049441f0e574cd09592b24f591fd0a68233/gui-project/docs/images/apple-touch-icon-72x72.png
--------------------------------------------------------------------------------
/gui-project/docs/images/apple-touch-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pgfearo/xmlspectrum/b0332049441f0e574cd09592b24f591fd0a68233/gui-project/docs/images/apple-touch-icon.png
--------------------------------------------------------------------------------
/gui-project/docs/images/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pgfearo/xmlspectrum/b0332049441f0e574cd09592b24f591fd0a68233/gui-project/docs/images/favicon.ico
--------------------------------------------------------------------------------
/gui-project/docs/images/micro-xms.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pgfearo/xmlspectrum/b0332049441f0e574cd09592b24f591fd0a68233/gui-project/docs/images/micro-xms.png
--------------------------------------------------------------------------------
/gui-project/docs/images/mini-xms.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pgfearo/xmlspectrum/b0332049441f0e574cd09592b24f591fd0a68233/gui-project/docs/images/mini-xms.png
--------------------------------------------------------------------------------
/gui-project/docs/images/screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pgfearo/xmlspectrum/b0332049441f0e574cd09592b24f591fd0a68233/gui-project/docs/images/screenshot.png
--------------------------------------------------------------------------------
/gui-project/docs/javascripts/tabs.js:
--------------------------------------------------------------------------------
1 |
2 | /**
3 | * Skeleton V1.1
4 | * Copyright 2011, Dave Gamache
5 | * www.getskeleton.com
6 | * Free to use under the MIT license.
7 | * http://www.opensource.org/licenses/mit-license.php
8 | * 8/17/2011
9 | */
10 |
11 | (function ($) {
12 | // hash change handler
13 | function hashchange () {
14 | var hash = window.location.hash
15 | , el = $('ul.tabs [href*="' + hash + '"]')
16 | , content = $(hash)
17 |
18 | if (el.length && !el.hasClass('active') && content.length) {
19 | el.closest('.tabs').find('.active').removeClass('active');
20 | el.addClass('active');
21 | content.show().addClass('active').siblings().hide().removeClass('active');
22 | }
23 | }
24 |
25 | // listen on event and fire right away
26 | $(window).on('hashchange.skeleton', hashchange);
27 | hashchange();
28 | $(hashchange);
29 | })(jQuery);
30 |
--------------------------------------------------------------------------------
/gui-project/docs/robots.txt:
--------------------------------------------------------------------------------
1 | # www.robotstxt.org/
2 | # www.google.com/support/webmasters/bin/answer.py?hl=en&answer=156449
3 |
4 | User-agent: *
5 |
6 |
--------------------------------------------------------------------------------
/gui-project/docs/stylesheets/layout.css:
--------------------------------------------------------------------------------
1 | /*
2 | * Skeleton V1.1
3 | * Copyright 2011, Dave Gamache
4 | * www.getskeleton.com
5 | * Free to use under the MIT license.
6 | * http://www.opensource.org/licenses/mit-license.php
7 | * 8/17/2011
8 | */
9 |
10 | /* Table of Content
11 | ==================================================
12 | #Site Styles
13 | #Page Styles
14 | #Media Queries
15 | #Font-Face */
16 |
17 | /* #Site Styles
18 | ================================================== */
19 |
20 | /* #Page Styles
21 | ================================================== */
22 |
23 | /* #Media Queries
24 | ================================================== */
25 |
26 | /* Smaller than standard 960 (devices and browsers) */
27 | @media only screen and (max-width: 959px) {}
28 |
29 | /* Tablet Portrait size to standard 960 (devices and browsers) */
30 | @media only screen and (min-width: 768px) and (max-width: 959px) {}
31 |
32 | /* All Mobile Sizes (devices and browser) */
33 | @media only screen and (max-width: 767px) {}
34 |
35 | /* Mobile Landscape Size to Tablet Portrait (devices and browsers) */
36 | @media only screen and (min-width: 480px) and (max-width: 767px) {}
37 |
38 | /* Mobile Portrait Size to Mobile Landscape Size (devices and browsers) */
39 | @media only screen and (max-width: 479px) {}
40 |
41 |
42 | /* #Font-Face
43 | ================================================== */
44 | /* This is the proper syntax for an @font-face file
45 | Just create a "fonts" folder at the root,
46 | copy your FontName into code below and remove
47 | comment brackets */
48 |
49 | /* @font-face {
50 | font-family: 'FontName';
51 | src: url('../fonts/FontName.eot');
52 | src: url('../fonts/FontName.eot?iefix') format('eot'),
53 | url('../fonts/FontName.woff') format('woff'),
54 | url('../fonts/FontName.ttf') format('truetype'),
55 | url('../fonts/FontName.svg#webfontZam02nTh') format('svg');
56 | font-weight: normal;
57 | font-style: normal; }
58 | */
--------------------------------------------------------------------------------
/gui-project/fonts/SourceCodePro-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pgfearo/xmlspectrum/b0332049441f0e574cd09592b24f591fd0a68233/gui-project/fonts/SourceCodePro-Regular.ttf
--------------------------------------------------------------------------------
/gui-project/manifest.mf:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | X-COMMENT: Main-Class will be added automatically by build
3 |
4 |
--------------------------------------------------------------------------------
/gui-project/nbproject/UPDATED.TXT:
--------------------------------------------------------------------------------
1 | ===========================================
2 | Project XMLSpectrum-FX build script updated
3 | ===========================================
4 |
5 | Project build script file jfx-impl.xml in nbproject sub-directory has not been recognized
6 | as compliant with this version of NetBeans JavaFX support module. To ensure correct
7 | and complete functionality within this NetBeans installation the script file has been
8 | backed up to jfx-impl_backup_5.xml and then updated to the currently supported state.
9 |
10 | FX Project build script auto-update may be triggered on project open either after
11 | NetBeans installation update or by manual changes in jfx-impl.xml. Please note that
12 | changing jfx-impl.xml manually is not recommended. Any build customization code should
13 | be placed only in build.xml in project root directory.
14 |
15 | Remark: The auto-update mechanism can be disabled by setting property
16 | javafx.disable.autoupdate=true
17 | Automatic opening of this notification when project files are updated can be disabled by setting property
18 | javafx.disable.autoupdate.notification=true
19 | (in build.properties, private.properties or project.properties).
20 |
21 | Remark: Files nbproject/jfx-impl_backup*.xml and this file nbproject/UPDATED.TXT
22 | are not used when building the project and can be freely deleted.
23 |
24 |
--------------------------------------------------------------------------------
/gui-project/nbproject/configs/Run_as_WebStart.properties:
--------------------------------------------------------------------------------
1 | # Do not modify this property in this configuration. It can be re-generated.
2 | $label=Run as WebStart
3 |
--------------------------------------------------------------------------------
/gui-project/nbproject/configs/Run_in_Browser.properties:
--------------------------------------------------------------------------------
1 | # Do not modify this property in this configuration. It can be re-generated.
2 | $label=Run in Browser
3 |
--------------------------------------------------------------------------------
/gui-project/nbproject/genfiles.properties:
--------------------------------------------------------------------------------
1 | build.xml.data.CRC32=a6535181
2 | build.xml.script.CRC32=00335096
3 | build.xml.stylesheet.CRC32=28e38971@1.50.0.46
4 | # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
5 | # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
6 | nbproject/build-impl.xml.data.CRC32=7bd63d52
7 | nbproject/build-impl.xml.script.CRC32=cc158222
8 | nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.74.2.48
9 |
--------------------------------------------------------------------------------
/gui-project/nbproject/private/configs/Run_as_WebStart.properties:
--------------------------------------------------------------------------------
1 | # Do not modify this property in this configuration. It can be re-generated.
2 | $label=Run as WebStart
3 | # Do not modify this property in this configuration. It can be re-generated.
4 | javafx.run.as=webstart
5 |
--------------------------------------------------------------------------------
/gui-project/nbproject/private/configs/Run_in_Browser.properties:
--------------------------------------------------------------------------------
1 | # Do not modify this property in this configuration. It can be re-generated.
2 | $label=Run in Browser
3 | # Do not modify this property in this configuration. It can be re-generated.
4 | javafx.run.as=embedded
5 |
--------------------------------------------------------------------------------
/gui-project/nbproject/private/private.properties:
--------------------------------------------------------------------------------
1 | auxiliary.org-netbeans-modules-projectapi.issue214819_5f_fx_5f_enabled=true
2 | compile.on.save=true
3 | do.depend=false
4 | do.jar=true
5 | javac.debug=true
6 | javadoc.preview=true
7 | javafx.run.as=standalone
8 | javafx.run.inbrowser=
9 | javafx.run.inbrowser.path=C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe
10 | user.properties.file=C:\\Users\\Philip\\AppData\\Roaming\\NetBeans\\8.0\\build.properties
11 |
--------------------------------------------------------------------------------
/gui-project/nbproject/private/private.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | file:/C:/Users/Philip/Documents/GitHub/xmlspectrum/gui-project/src/webviewbrowser/HTMLRender.java
7 | file:/C:/Users/Philip/Documents/GitHub/xmlspectrum/gui-project/src/webviewbrowser/RenderingTask.java
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/gui-project/nbproject/project.properties:
--------------------------------------------------------------------------------
1 | annotation.processing.enabled=true
2 | annotation.processing.enabled.in.editor=false
3 | annotation.processing.processors.list=
4 | annotation.processing.run.all.processors=true
5 | annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
6 | application.desc=XSLT and XPath syntax highlighter and code formatter
7 | application.homepage=http://qutoric.com
8 | application.splash=C:\\Users\\Philip\\Documents\\NetBeansProjects\\WebViewBrowser\\docs\\images\\mini-xms.png
9 | application.title=XMLSpectrum-FX 0.2
10 | application.vendor=Phil Fearon
11 | build.classes.dir=${build.dir}/classes
12 | build.classes.excludes=**/*.java,**/*.form
13 | # This directory is removed when the project is cleaned:
14 | build.dir=build
15 | build.generated.dir=${build.dir}/generated
16 | build.generated.sources.dir=${build.dir}/generated-sources
17 | # Only compile against the classpath explicitly listed here:
18 | build.sysclasspath=ignore
19 | build.test.classes.dir=${build.dir}/test/classes
20 | build.test.results.dir=${build.dir}/test/results
21 | compile.on.save=true
22 | compile.on.save.unsupported.javafx=true
23 | # Uncomment to specify the preferred debugger connection transport:
24 | #debug.transport=dt_socket
25 | debug.classpath=\
26 | ${run.classpath}
27 | debug.test.classpath=\
28 | ${run.test.classpath}
29 | # This directory is removed when the project is cleaned:
30 | dist.dir=dist
31 | dist.jar=${dist.dir}/XMLSpectrum-FX.jar
32 | dist.javadoc.dir=${dist.dir}/javadoc
33 | endorsed.classpath=
34 | excludes=
35 | file.reference.=..\\..\\..\\..\\..\\
36 | file.reference.saxon9he.jar=C:\\Saxon\\saxon9he.jar
37 | includes=**
38 | # Non-JavaFX 2.0 jar file creation is deactivated in JavaFX 2.0 projects
39 | jar.archive.disabled=true
40 | jar.compress=false
41 | javac.classpath=\
42 | ${file.reference.saxon9he.jar}:\
43 | ${javafx.classpath.extension}
44 | # Space-separated list of extra javac options
45 | javac.compilerargs=
46 | javac.deprecation=false
47 | javac.processorpath=\
48 | ${javac.classpath}
49 | javac.source=1.5
50 | javac.target=1.5
51 | javac.test.classpath=\
52 | ${javac.classpath}:\
53 | ${build.classes.dir}
54 | javac.test.processorpath=\
55 | ${javac.test.classpath}
56 | javadoc.additionalparam=
57 | javadoc.author=false
58 | javadoc.encoding=${source.encoding}
59 | javadoc.noindex=false
60 | javadoc.nonavbar=false
61 | javadoc.notree=false
62 | javadoc.private=false
63 | javadoc.splitindex=true
64 | javadoc.use=true
65 | javadoc.version=false
66 | javadoc.windowtitle=
67 | javafx.application.implementation.version=1.0
68 | javafx.binarycss=false
69 | javafx.classpath.extension=\
70 | ${java.home}/lib/jfxrt.jar:\
71 | ${java.home}/lib/javaws.jar:\
72 | ${java.home}/lib/deploy.jar:\
73 | ${java.home}/lib/plugin.jar
74 | javafx.deploy.adddesktopshortcut=false
75 | javafx.deploy.addstartmenushortcut=false
76 | javafx.deploy.allowoffline=true
77 | # If true, application update mode is set to 'background', if false, update mode is set to 'eager'
78 | javafx.deploy.backgroundupdate=true
79 | javafx.deploy.disable.proxy=false
80 | javafx.deploy.embedJNLP=true
81 | javafx.deploy.icon=file:/C:/Users/Philip/Pictures/xmlspectrum-icon.png
82 | javafx.deploy.includeDT=true
83 | javafx.deploy.installpermanently=false
84 | javafx.deploy.permissionselevated=false
85 | # This is a JavaFX project
86 | javafx.enabled=true
87 | javafx.fallback.class=com.javafx.main.NoJavaFXFallback
88 | # Main class for JavaFX
89 | javafx.main.class=webviewbrowser.WebViewBrowser
90 | javafx.native.bundling.enabled=false
91 | javafx.native.bundling.type=all
92 | javafx.preloader.class=
93 | # This project does not use Preloader
94 | javafx.preloader.enabled=false
95 | javafx.preloader.jar.filename=
96 | javafx.preloader.jar.path=
97 | javafx.preloader.project.path=
98 | javafx.preloader.type=none
99 | # Set true for GlassFish only. Rebases manifest classpaths of JARs in lib dir. Not usable with signed JARs.
100 | javafx.rebase.libs=false
101 | javafx.run.height=600
102 | javafx.run.width=800
103 | javafx.signing.blob=false
104 | javafx.signing.enabled=false
105 | javafx.signing.type=notsigned
106 | # Pre-JavaFX 2.0 WebStart is deactivated in JavaFX 2.0 projects
107 | jnlp.enabled=false
108 | # Main class for Java launcher
109 | main.class=com.javafx.main.Main
110 | # For improved security specify narrower Codebase manifest attribute to prevent RIAs from being repurposed
111 | manifest.custom.codebase=*
112 | # Specify Permissions manifest attribute to override default (choices: sandbox, all-permissions)
113 | manifest.custom.permissions=
114 | manifest.file=manifest.mf
115 | meta.inf.dir=${src.dir}/META-INF
116 | mkdist.disabled=false
117 | native.bundling.enabled=true
118 | platform.active=default_platform
119 | project.license=apache20
120 | run.classpath=\
121 | ${javac.classpath}:\
122 | ${dist.jar}:\
123 | ${file.reference.saxon9he.jar}
124 | run.test.classpath=\
125 | ${javac.test.classpath}:\
126 | ${build.test.classes.dir}
127 | source.encoding=UTF-8
128 | src.dir=src
129 | test.src.dir=test
130 |
--------------------------------------------------------------------------------
/gui-project/nbproject/project.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | org.netbeans.modules.java.j2seproject
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | XMLSpectrum-FX
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/gui-project/notices/Saxon-notices/APACHE-ANT.txt:
--------------------------------------------------------------------------------
1 | Apache Ant
2 | Copyright 1999-2006 The Apache Software Foundation
3 |
4 | This product includes software developed by
5 | The Apache Software Foundation (http://www.apache.org/).
6 |
7 | This product includes also software developed by :
8 | - the W3C consortium (http://www.w3c.org) ,
9 | - the SAX project (http://www.saxproject.org)
10 |
11 | The task is based on code Copyright (c) 2002, Landmark
12 | Graphics Corp that has been kindly donated to the Apache Software
13 | Foundation.
14 |
--------------------------------------------------------------------------------
/gui-project/notices/Saxon-notices/APACHE-RESOLVER.txt:
--------------------------------------------------------------------------------
1 | Apache XML Commons Resolver
2 | Copyright 2006 The Apache Software Foundation.
3 |
4 | This product includes software developed at
5 | The Apache Software Foundation http://www.apache.org/
6 |
7 | Portions of this code are derived from classes placed in the
8 | public domain by Arbortext on 10 Apr 2000. See:
9 | http://www.arbortext.com/customer_support/updates_and_technical_notes/catalogs/docs/README.htm
10 |
--------------------------------------------------------------------------------
/gui-project/notices/Saxon-notices/APACHE-XERCES.txt:
--------------------------------------------------------------------------------
1 |
2 | This notice is included in the Saxon distribution because Saxon on .NET
3 | includes a copy of the Apache Xerces XML parser, converted to a .NET DLL
4 | by cross-compiling using IKVMC, but otherwise unmodified.
5 |
6 | =========================================================================
7 | == NOTICE file corresponding to section 4(d) of the Apache License, ==
8 | == Version 2.0, in this case for the Apache Xerces Java distribution. ==
9 | =========================================================================
10 |
11 | Apache Xerces Java
12 | Copyright 1999-2006 The Apache Software Foundation
13 |
14 | This product includes software developed at
15 | The Apache Software Foundation (http://www.apache.org/).
16 |
17 | Portions of this software were originally based on the following:
18 | - software copyright (c) 1999, IBM Corporation., http://www.ibm.com.
19 | - software copyright (c) 1999, Sun Microsystems., http://www.sun.com.
20 | - voluntary contributions made by Paul Eng on behalf of the
21 | Apache Software Foundation that were originally developed at iClick, Inc.,
22 | software copyright (c) 1999.
--------------------------------------------------------------------------------
/gui-project/notices/Saxon-notices/ASM.txt:
--------------------------------------------------------------------------------
1 | (This file relates to the ASM bytecode generation library)
2 |
3 | Copyright (c) 2000-2011 INRIA, France Telecom
4 | All rights reserved.
5 |
6 | Redistribution and use in source and binary forms, with or without
7 | modification, are permitted provided that the following conditions
8 | are met:
9 |
10 | 1. Redistributions of source code must retain the above copyright
11 | notice, this list of conditions and the following disclaimer.
12 |
13 | 2. Redistributions in binary form must reproduce the above copyright
14 | notice, this list of conditions and the following disclaimer in the
15 | documentation and/or other materials provided with the distribution.
16 |
17 | 3. Neither the name of the copyright holders nor the names of its
18 | contributors may be used to endorse or promote products derived from
19 | this software without specific prior written permission.
20 |
21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
25 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
31 | THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
/gui-project/notices/Saxon-notices/CERN.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pgfearo/xmlspectrum/b0332049441f0e574cd09592b24f591fd0a68233/gui-project/notices/Saxon-notices/CERN.txt
--------------------------------------------------------------------------------
/gui-project/notices/Saxon-notices/FRIJTERS.txt:
--------------------------------------------------------------------------------
1 |
2 | (This notice is included in the Saxon distribution on .NET because
3 | Saxon includes the run-time library of the IKVM product developed
4 | by Jeroen Frijters, which was made available under this license.
5 | The software is reissued without modifications, other than omission
6 | of components that are not needed, such as the IKVMC compiler.)
7 |
8 | Copyright (C) 2002-2007 Jeroen Frijters
9 |
10 | This software is provided 'as-is', without any express or implied
11 | warranty. In no event will the authors be held liable for any damages
12 | arising from the use of this software.
13 |
14 | Permission is granted to anyone to use this software for any purpose,
15 | including commercial applications, and to alter it and redistribute it
16 | freely, subject to the following restrictions:
17 |
18 | 1. The origin of this software must not be misrepresented; you must not
19 | claim that you wrote the original software. If you use this software
20 | in a product, an acknowledgment in the product documentation would be
21 | appreciated but is not required.
22 |
23 | 2. Altered source versions must be plainly marked as such, and must not be
24 | misrepresented as being the original software.
25 |
26 | 3. This notice may not be removed or altered from any source distribution.
27 |
28 | Jeroen Frijters
29 | jeroen@frijters.net
30 |
--------------------------------------------------------------------------------
/gui-project/notices/Saxon-notices/JAMESCLARK.txt:
--------------------------------------------------------------------------------
1 |
2 | (This notice is included in the Saxon distribution because Saxon's XPath parser
3 | was originally derived from an XPath parser written by James Clark and made available
4 | under this license. The Saxon XPath parser has since diverged very substantially, but
5 | there are traces of the original code still present.)
6 |
7 | Copyright (c) 1998, 1999 James Clark
8 |
9 | Permission is hereby granted, free of charge, to any person obtaining
10 | a copy of this software and associated documentation files (the
11 | "Software"), to deal in the Software without restriction, including
12 | without limitation the rights to use, copy, modify, merge, publish,
13 | distribute, sublicense, and/or sell copies of the Software, and to
14 | permit persons to whom the Software is furnished to do so, subject to
15 | the following conditions:
16 |
17 | The above copyright notice and this permission notice shall be included
18 | in all copies or substantial portions of the Software.
19 |
20 | THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
21 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23 | IN NO EVENT SHALL JAMES CLARK BE LIABLE FOR ANY CLAIM, DAMAGES OR
24 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
25 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
26 | OTHER DEALINGS IN THE SOFTWARE.
27 |
28 | Except as contained in this notice, the name of James Clark shall
29 | not be used in advertising or otherwise to promote the sale, use or
30 | other dealings in this Software without prior written authorization
31 | from James Clark.
32 |
--------------------------------------------------------------------------------
/gui-project/notices/Saxon-notices/LEGAL.txt:
--------------------------------------------------------------------------------
1 | LEGAL NOTICE
2 |
3 | This notice is issued to fulfil the requirements of the Mozilla Public License version 1.0 ("MPL 1.0")
4 | sections 3.4(a) and 3.6. MPL 1.0 can be found at http://www.mozilla.org/MPL/MPL-1.0.html.
5 |
6 | Section 3.4(a) of MPL 1.0 states that any third party intellectual property rights in particular
7 | functionality or code must be notified in a text file named LEGAL that is issued with the source code. Saxon
8 | includes a number of such third party components, and the relevant claims are included in notices included
9 | in the same directory as this notice. Although MPL 1.0 requires this notice to be included only with source
10 | code, some of the third parties may also require notices to be included with executable code. Therefore, Saxon
11 | executable code must not be distributed separately from this notice and all the accompanying third
12 | party notices. The term "Distribution" here includes making the code available for download, and its
13 | inclusion in download repositories such as Maven.
14 |
15 | Section 3.6 of MPL 1.0 states:
16 |
17 | You may distribute Covered Code in Executable form only if the requirements of Section 3.1-3.5 have
18 | been met for that Covered Code, and if You include a notice stating that the Source Code version of
19 | the Covered Code is available under the terms of this License, including a description of how and
20 | where You have fulfilled the obligations of Section 3.2.
21 |
22 | Section 3.2 requires the Source Code of Covered Code to be made available via an accepted Electronic
23 | Distribution Mechanism.
24 |
25 | The Source Code version of the Covered Code (that is, the source code of Saxon-HE) is available under the
26 | terms of the Mozilla Public License version 1.0, and may be obtained from the Subversion repository
27 | for the Saxon project on SourceForge, at https://sourceforge.net/svn/?group_id=29872.
28 | The precise version of the Subversion source for a particular Saxon maintenance release can be
29 | determined by referring to the release notes for the particular release in the SourceForge download area.
30 |
31 | Note that MPL 1.0 requires that any modifications to this source code must be made available under the terms
32 | of the MPL "to anyone to whom you made an executable version available". As a courtesy, it is also requested
33 | that you make such modifications available to Saxonica Limited.
--------------------------------------------------------------------------------
/gui-project/notices/Saxon-notices/LICENSE.txt:
--------------------------------------------------------------------------------
1 | The contents of these file are subject to the Mozilla Public License Version 1.0 (the "License");
2 | you may not use these files except in compliance with the License. You may obtain a copy of the
3 | License at http://www.mozilla.org/MPL/
4 |
5 | Software distributed under the License is distributed on an "AS IS" basis,
6 | WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the
7 | specific language governing rights and limitations under the License.
8 |
9 | The Original Code is all Saxon modules labelled with a notice referring to this license.
10 |
11 | The Initial Developer of the Original Code is Michael Kay, except where otherwise specified in an individual module.
12 |
13 | Portions created by other named contributors are copyright as identified in the relevant module. All Rights Reserved.
14 |
15 | Contributor(s) are listed in the documentation: see notices/contributors.
--------------------------------------------------------------------------------
/gui-project/notices/Saxon-notices/THAI.txt:
--------------------------------------------------------------------------------
1 |
2 | (This notice is included in the Saxon distribution because Saxon
3 | uses code for conversion of XML Schema Regular expressions to
4 | Java/.NET regular expressions that was originally written by James
5 | Clark and made available under this license. The Saxon version of
6 | the code has been enhanced in various ways but is still recognizably
7 | based on the original.)
8 |
9 | Copyright (c) 2001-2003 Thai Open Source Software Center Ltd
10 | All rights reserved.
11 |
12 | Redistribution and use in source and binary forms, with or without
13 | modification, are permitted provided that the following conditions are
14 | met:
15 |
16 | Redistributions of source code must retain the above copyright
17 | notice, this list of conditions and the following disclaimer.
18 |
19 | Redistributions in binary form must reproduce the above copyright
20 | notice, this list of conditions and the following disclaimer in
21 | the documentation and/or other materials provided with the
22 | distribution.
23 |
24 | Neither the name of the Thai Open Source Software Center Ltd nor
25 | the names of its contributors may be used to endorse or promote
26 | products derived from this software without specific prior written
27 | permission.
28 |
29 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
30 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
31 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
32 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
33 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
34 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
35 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
36 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
37 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
38 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
39 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
40 |
--------------------------------------------------------------------------------
/gui-project/notices/Saxon-notices/UNICODE.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pgfearo/xmlspectrum/b0332049441f0e574cd09592b24f591fd0a68233/gui-project/notices/Saxon-notices/UNICODE.txt
--------------------------------------------------------------------------------
/gui-project/notices/SourceCodePro-LICENSE.txt:
--------------------------------------------------------------------------------
1 | Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries.
2 |
3 | This Font Software is licensed under the SIL Open Font License, Version 1.1.
4 |
5 | This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL
6 |
7 |
8 | -----------------------------------------------------------
9 | SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10 | -----------------------------------------------------------
11 |
12 | PREAMBLE
13 | The goals of the Open Font License (OFL) are to stimulate worldwide
14 | development of collaborative font projects, to support the font creation
15 | efforts of academic and linguistic communities, and to provide a free and
16 | open framework in which fonts may be shared and improved in partnership
17 | with others.
18 |
19 | The OFL allows the licensed fonts to be used, studied, modified and
20 | redistributed freely as long as they are not sold by themselves. The
21 | fonts, including any derivative works, can be bundled, embedded,
22 | redistributed and/or sold with any software provided that any reserved
23 | names are not used by derivative works. The fonts and derivatives,
24 | however, cannot be released under any other type of license. The
25 | requirement for fonts to remain under this license does not apply
26 | to any document created using the fonts or their derivatives.
27 |
28 | DEFINITIONS
29 | "Font Software" refers to the set of files released by the Copyright
30 | Holder(s) under this license and clearly marked as such. This may
31 | include source files, build scripts and documentation.
32 |
33 | "Reserved Font Name" refers to any names specified as such after the
34 | copyright statement(s).
35 |
36 | "Original Version" refers to the collection of Font Software components as
37 | distributed by the Copyright Holder(s).
38 |
39 | "Modified Version" refers to any derivative made by adding to, deleting,
40 | or substituting -- in part or in whole -- any of the components of the
41 | Original Version, by changing formats or by porting the Font Software to a
42 | new environment.
43 |
44 | "Author" refers to any designer, engineer, programmer, technical
45 | writer or other person who contributed to the Font Software.
46 |
47 | PERMISSION & CONDITIONS
48 | Permission is hereby granted, free of charge, to any person obtaining
49 | a copy of the Font Software, to use, study, copy, merge, embed, modify,
50 | redistribute, and sell modified and unmodified copies of the Font
51 | Software, subject to the following conditions:
52 |
53 | 1) Neither the Font Software nor any of its individual components,
54 | in Original or Modified Versions, may be sold by itself.
55 |
56 | 2) Original or Modified Versions of the Font Software may be bundled,
57 | redistributed and/or sold with any software, provided that each copy
58 | contains the above copyright notice and this license. These can be
59 | included either as stand-alone text files, human-readable headers or
60 | in the appropriate machine-readable metadata fields within text or
61 | binary files as long as those fields can be easily viewed by the user.
62 |
63 | 3) No Modified Version of the Font Software may use the Reserved Font
64 | Name(s) unless explicit written permission is granted by the corresponding
65 | Copyright Holder. This restriction only applies to the primary font name as
66 | presented to the users.
67 |
68 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69 | Software shall not be used to promote, endorse or advertise any
70 | Modified Version, except to acknowledge the contribution(s) of the
71 | Copyright Holder(s) and the Author(s) or with their explicit written
72 | permission.
73 |
74 | 5) The Font Software, modified or unmodified, in part or in whole,
75 | must be distributed entirely under this license, and must not be
76 | distributed under any other license. The requirement for fonts to
77 | remain under this license does not apply to any document created
78 | using the Font Software.
79 |
80 | TERMINATION
81 | This license becomes null and void if any of the above conditions are
82 | not met.
83 |
84 | DISCLAIMER
85 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88 | OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89 | COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90 | INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91 | DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92 | FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93 | OTHER DEALINGS IN THE FONT SOFTWARE.
94 |
--------------------------------------------------------------------------------
/gui-project/notices/XMLSpectrum-license.txt:
--------------------------------------------------------------------------------
1 | XMLSpectrum - Copyright 2013 Philip Fearon
2 |
3 | Licensed under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License.
5 | You may obtain a copy of the License at
6 |
7 | http://www.apache.org/licenses/LICENSE-2.0
8 |
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 |
--------------------------------------------------------------------------------
/gui-project/output/theme.css:
--------------------------------------------------------------------------------
1 |
2 | @import url(http://fonts.googleapis.com/css?family=Source+Code+Pro);
3 | p.spectrum, pre.spectrum {
4 |
5 | margin:0px;
6 | font-family:'Source Code Pro', monospace;
7 | font-size: 0.8em;
8 | white-space: pre-wrap;
9 | display: block;
10 | border: none thin;
11 | border-color: #405075;
12 | background-color:#002b36;
13 | padding: 2px;
14 | margin-bottom:5px;
15 |
16 | }
17 |
18 | div.spectrum-toc {
19 |
20 | font-family:'Source Code Pro', monospace;
21 | font-size: 0.8em;
22 | display: block;
23 | border: none thin;
24 | border-color: #405075;
25 | background-color:#002b36;
26 | padding: 2px;
27 |
28 | }
29 |
30 | ul.base1, ul.spectrum-toc {
31 | color:#93a1a1;
32 | }
33 |
34 | .spectrum span {
35 | white-space: pre-wrap;
36 | }
37 |
38 | span.ww {background-color: #073642; } span.base01, span.eq-equ, span.z, span.sc, span.scx, span.ec, span.es, span.ez, span.atneq {color: #586e75; } span.base03, span.ww:not(:hover), span.txt:not(:hover), span.cm:not(:hover), span.pi:not(:hover) {background-color: #002b36; } span.base0, span.txt, span.cd {color: #839496; } span.base1, span.literal {color: #93a1a1; } span.yellow, span.op, span.type-op, span.if, span.higher, span.step, span.whitespace, span.quantifier {color: #b58900; } span.orange, span.function {color: #cb4b16; } span.red, span.fname, span.tname {color: #dc322f; } span.magenta, span.vname, span.variable, span.external {color: #d33682; } span.violet, span.qname, span.type-name, span.unclosed, span.en, span.cl, span.href, span.tcall {color: #6c71c4; } span.blue, span.enxsl, span.clxsl, span.enx, span.filter, span.parenthesis, span.node {color: #268bd2; } span.cyan, span.atn, span.numeric, span.pi, span.dt, span.axis, span.context, span.bracedq {color: #2aa198; } span.green, span.cm, span.comment, span.av, span.type, span.node-type {color: #859900; }
39 |
40 | a.solar {
41 | text-decoration:none;
42 | }
43 |
--------------------------------------------------------------------------------
/gui-project/readme.md:
--------------------------------------------------------------------------------
1 | XmlSpectrum Gui Project
2 |
3 | This JavaFX project provides a GUI designed to showcase the capabilities of the XMLSpectrum XSLT project. The Tool could also be a useful tool in its own right.
4 |
5 | GUI-Specific Features
6 |
7 | Processes input either from file or an editable textarea
8 | Majority of XMLSPECTRUM transform parameters controllable from the UI
9 | XSLT code and XML used IS external to the jar for easy configuration
10 | The XMLSpectrum XSLT transforms are processed on a separate thread
11 | A console area shows xsl:message and error output in real time for monitoring progress
12 | Saxon-HE included
13 | Runs on OSX, Linux or Windows
14 | Requires Java 1.7SE or later
15 |
16 | This project is set up to be built most conveniently from the NetBeans IDE,
17 | xmlspectrum-fx-dist.zip contains the latest stable build.
18 |
--------------------------------------------------------------------------------
/gui-project/samples/formatting.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
10 |
11 |
12 |
19 |
25 |
37 |
38 |
39 |
45 |
46 |
52 |
53 |
54 |
55 |
56 |
57 |
58 | the quic kbrown fox juod umpe ocver the lazy dog
59 | newer text now is the time for all good people to
60 | come to the aid
61 |
62 |
63 | one two three
64 | alpha bravo
65 | charlie delta
66 | echo
67 |
68 |
69 |
71 |
72 |
73 | This is a test
74 | of formatting
75 | in cdata
76 |
77 | ]]>
78 |
79 |
85 |
86 |
87 |
88 |
--------------------------------------------------------------------------------
/gui-project/samples/nolines.xml:
--------------------------------------------------------------------------------
1 | testing things are ok sometimes mixed doesn't show well
--------------------------------------------------------------------------------
/gui-project/samples/schema-assert.xsd:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
38 |
39 |
40 |
41 |
42 |
43 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/gui-project/samples/xpath-text.txt:
--------------------------------------------------------------------------------
1 | if (empty($exclude))
2 | then ()
3 | else if ($exclude/@end)
4 | then
5 | $exclude/@end cast as xs:integer + 1
6 | else ()
7 |
--------------------------------------------------------------------------------
/gui-project/scripts/xmlspectrum.bat:
--------------------------------------------------------------------------------
1 | java -jar XMLSpectrum-FX.jar
2 |
--------------------------------------------------------------------------------
/gui-project/src/webviewbrowser/FXListener.java:
--------------------------------------------------------------------------------
1 | /*
2 | * To change this template, choose Tools | Templates
3 | * and open the template in the editor.
4 | */
5 | package webviewbrowser;
6 |
7 | /**
8 | *
9 | * @author Philip
10 | */
11 | public interface FXListener {
12 | public void callback(String msg);
13 | }
14 |
--------------------------------------------------------------------------------
/gui-project/src/webviewbrowser/RenderMessageListener.java:
--------------------------------------------------------------------------------
1 | /*
2 | * To change this template, choose Tools | Templates
3 | * and open the template in the editor.
4 | */
5 | package webviewbrowser;
6 |
7 | import javax.xml.transform.SourceLocator;
8 | import net.sf.saxon.s9api.MessageListener;
9 | import net.sf.saxon.s9api.XdmNode;
10 |
11 | /**
12 | *
13 | * @author Philip
14 | */
15 | public class RenderMessageListener implements MessageListener {
16 |
17 | private FXListener listener;
18 |
19 | public RenderMessageListener(FXListener listener){
20 | this.listener = listener;
21 | }
22 |
23 | public void message(XdmNode xn, boolean bln, SourceLocator sl) {
24 | String msg = xn.getStringValue();
25 | listener.callback(msg);
26 | }
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/gui-project/src/webviewbrowser/RenderingTask.java:
--------------------------------------------------------------------------------
1 | /*
2 | * To change this template, choose Tools | Templates
3 | * and open the template in the editor.
4 | */
5 | package webviewbrowser;
6 |
7 | import java.io.File;
8 | import java.io.IOException;
9 | import java.util.Map;
10 | import java.util.logging.Level;
11 | import java.util.logging.Logger;
12 | import javafx.concurrent.Task;
13 | import javax.xml.transform.SourceLocator;
14 | import net.sf.saxon.s9api.MessageListener;
15 | import net.sf.saxon.s9api.Processor;
16 | import net.sf.saxon.s9api.QName;
17 | import net.sf.saxon.s9api.Serializer;
18 | import net.sf.saxon.s9api.XdmAtomicValue;
19 | import net.sf.saxon.s9api.XdmNode;
20 | import net.sf.saxon.s9api.XsltTransformer;
21 |
22 | /**
23 | *
24 | * @author Philip
25 | */
26 | public class RenderingTask extends Task {
27 |
28 | final private XsltTransformer trans;
29 | final private Map parameterMap;
30 | final private Serializer out;
31 | final private Processor proc;
32 | final private FXListener listener;
33 | final private String outPath;
34 |
35 | public RenderingTask(Map parameterMap, XsltTransformer transformer, Processor proc, FXListener listener, String outPath){
36 | this.trans = transformer;
37 | this.proc = proc;
38 | this.parameterMap = parameterMap;
39 | this.listener = listener;
40 | this.outPath = outPath;
41 | Serializer serializer = null;
42 | try {
43 | serializer = getTempDestination();
44 | } catch (IOException ex) {
45 | Logger.getLogger(RenderingTask.class.getName()).log(Level.SEVERE, null, ex);
46 | }
47 | this.out = serializer;
48 | }
49 |
50 | @Override
51 | protected String call() throws Exception {
52 | trans.setInitialTemplate(new QName("main"));
53 | for (Map.Entry entry : parameterMap.entrySet()) {
54 | trans.setParameter(new QName(entry.getKey()),
55 | new XdmAtomicValue(entry.getValue()));
56 | }
57 |
58 |
59 | trans.setMessageListener(
60 | new MessageListener(){
61 | @Override
62 | public void message(XdmNode xn, boolean bln, SourceLocator sl) {
63 | String msg = "[XSLT MSG] " + xn.getStringValue();
64 | updateMessage(msg);
65 | }
66 | }
67 | );
68 | trans.setDestination(out);
69 | trans.transform();
70 | updateMessage(outPath);
71 | updateProgress(1,1);
72 | return "";
73 | }
74 | @Override
75 | public void updateMessage(final String msg) {
76 | javafx.application.Platform.runLater(new Runnable() {
77 | public void run() {
78 | listener.callback(msg);
79 | }
80 | });
81 | }
82 |
83 | private Serializer getTempDestination() throws IOException {
84 | File outFile;
85 | outFile = File.createTempFile("xms-", ".html");
86 | Serializer localOut = proc.newSerializer(outFile);
87 | localOut.setOutputProperty(Serializer.Property.METHOD, "html");
88 | localOut.setOutputProperty(Serializer.Property.INDENT, "yes");
89 | return localOut;
90 | }
91 |
92 |
93 |
94 | }
95 |
--------------------------------------------------------------------------------
/gui-project/xmlspectrum-fx-dist.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pgfearo/xmlspectrum/b0332049441f0e574cd09592b24f591fd0a68233/gui-project/xmlspectrum-fx-dist.zip
--------------------------------------------------------------------------------
/gui-project/xmlspectrum-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pgfearo/xmlspectrum/b0332049441f0e574cd09592b24f591fd0a68233/gui-project/xmlspectrum-icon.png
--------------------------------------------------------------------------------
/resources/CeSample.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pgfearo/xmlspectrum/b0332049441f0e574cd09592b24f591fd0a68233/resources/CeSample.zip
--------------------------------------------------------------------------------