summaryrefslogtreecommitdiffstats
path: root/emacs.d/nxhtml/etc/schema
diff options
context:
space:
mode:
authorGravatar Tom Willemsen2011-03-07 09:04:49 +0100
committerGravatar Tom Willemsen2011-03-07 09:04:49 +0100
commit94d2fc1815a919734353c942f224db1de4b4fcb8 (patch)
tree4168e816ead132bfa3510e272427837c3895f5e2 /emacs.d/nxhtml/etc/schema
parentd0e7674fdb1de12c8de202d4028a5d7ed3669a6e (diff)
downloaddotfiles-94d2fc1815a919734353c942f224db1de4b4fcb8.tar.gz
dotfiles-94d2fc1815a919734353c942f224db1de4b4fcb8.zip
Django, org
* Added nxhtml, mostly for django support. * Changed some org settings.
Diffstat (limited to 'emacs.d/nxhtml/etc/schema')
-rw-r--r--emacs.d/nxhtml/etc/schema/FDA-2009-N-0392-0396.1.docbin0 -> 47104 bytes
-rw-r--r--emacs.d/nxhtml/etc/schema/genshi-old.rnc27
-rw-r--r--emacs.d/nxhtml/etc/schema/genshi-schemas.xml3
-rw-r--r--emacs.d/nxhtml/etc/schema/genshi.rnc84
-rw-r--r--emacs.d/nxhtml/etc/schema/mjt.rnc74
-rw-r--r--emacs.d/nxhtml/etc/schema/nxml-erb.patch37
-rw-r--r--emacs.d/nxhtml/etc/schema/old-genshi.rnc31
-rw-r--r--emacs.d/nxhtml/etc/schema/old-qtmstr-xhtml.rnc61
-rw-r--r--emacs.d/nxhtml/etc/schema/old-xinclude.rnc11
-rw-r--r--emacs.d/nxhtml/etc/schema/qtmstr-xhtml-old.rnc58
-rw-r--r--emacs.d/nxhtml/etc/schema/qtmstr-xhtml.rnc66
-rw-r--r--emacs.d/nxhtml/etc/schema/schema-path-patch.el95
-rw-r--r--emacs.d/nxhtml/etc/schema/xhtml-loader.rnc1
-rw-r--r--emacs.d/nxhtml/etc/schema/xinclude.rnc35
14 files changed, 583 insertions, 0 deletions
diff --git a/emacs.d/nxhtml/etc/schema/FDA-2009-N-0392-0396.1.doc b/emacs.d/nxhtml/etc/schema/FDA-2009-N-0392-0396.1.doc
new file mode 100644
index 0000000..aa2eff3
--- /dev/null
+++ b/emacs.d/nxhtml/etc/schema/FDA-2009-N-0392-0396.1.doc
Binary files differ
diff --git a/emacs.d/nxhtml/etc/schema/genshi-old.rnc b/emacs.d/nxhtml/etc/schema/genshi-old.rnc
new file mode 100644
index 0000000..5384fe1
--- /dev/null
+++ b/emacs.d/nxhtml/etc/schema/genshi-old.rnc
@@ -0,0 +1,27 @@
+namespace py = "http://genshi.edgewall.org/"
+
+genshi.expr-type = xsd:string { minLength = "1" }
+genshi.with-type = xsd:string { minLength = "1" }
+genshi.choose-type = xsd:string
+genshi.def-type = xsd:string
+genshi.xpath-type = xsd:anyURI
+
+genshi.attrib = attribute py:if { genshi.expr-type }?,
+ attribute py:choose { genshi.choose-type }?,
+ attribute py:when { genshi.expr-type }?,
+ attribute py:otherwise { genshi.expr-type }?,
+ attribute py:for { genshi.expr-type }?,
+ attribute py:def { genshi.def-type }?,
+ attribute py:match { genshi.xpath-type }?,
+ attribute py:with { genshi.with-type }?,
+ attribute py:attrs { genshi.expr-type }?,
+ attribute py:content { genshi.expr-type }?,
+ attribute py:replace { genshi.expr-type }?,
+ attribute py:strip { genshi.expr-type }?
+
+genshi.if.attlist = attribute expr { genshi.expr-type }
+genshi.for.attlist = attribute each { genshi.expr-type }
+genshi.def.attlist = attribute each { genshi.expr-type }
+genshi.with.attlist = attribute vars { genshi.with-type }
+
+
diff --git a/emacs.d/nxhtml/etc/schema/genshi-schemas.xml b/emacs.d/nxhtml/etc/schema/genshi-schemas.xml
new file mode 100644
index 0000000..89fe05f
--- /dev/null
+++ b/emacs.d/nxhtml/etc/schema/genshi-schemas.xml
@@ -0,0 +1,3 @@
+<locatingRules xmlns="http://thaiopensource.com/ns/locating-rules/1.0">
+ <typeId id="XHTML" uri="qtmstr-xhtml.rnc" />
+</locatingRules>
diff --git a/emacs.d/nxhtml/etc/schema/genshi.rnc b/emacs.d/nxhtml/etc/schema/genshi.rnc
new file mode 100644
index 0000000..b9ddf76
--- /dev/null
+++ b/emacs.d/nxhtml/etc/schema/genshi.rnc
@@ -0,0 +1,84 @@
+default namespace = "http://genshi.edgewall.org/"
+namespace py = "http://genshi.edgewall.org/"
+
+include "xinclude.rnc"
+
+# There's no way to just match the text part against a Genshi Python expression
+# See: http://relaxng.org/compact-tutorial-20030326.html#id2814737
+python.expression = text
+
+genshi.expr-type = xsd:string { minLength = "1" }
+genshi.xpath-type = xsd:anyURI
+
+genshi.attrib =
+ attribute py:if { genshi.expr-type }?,
+ attribute py:choose { text }?,
+ attribute py:when { genshi.expr-type }?,
+ attribute py:otherwise { text }?,
+ attribute py:for { genshi.expr-type }?,
+ attribute py:def { genshi.expr-type }?,
+ attribute py:match { genshi.xpath-type}?,
+ attribute py:with { genshi.expr-type }?,
+ attribute py:attrs { genshi.expr-type }?,
+ attribute py:content { text }?,
+ attribute py:replace { genshi.expr-type }?,
+ attribute py:strip { text }?
+
+genshi.if.attlist = attribute test { genshi.expr-type }
+genshi.choose.attlist = attribute test { text }
+genshi.when.attlist = attribute test { genshi.expr-type }
+genshi.for.attlist = attribute each { genshi.expr-type }
+genshi.def.attlist = attribute function { genshi.expr-type }
+genshi.with.attlist = attribute vars { genshi.expr-type }
+genshi.replace.attlist = attribute value { genshi.expr-type }
+genshi.match.attlist =
+ attribute path { genshi.xpath-type },
+ attribute buffer { "true" | "false" }?,
+ attribute once { "true" | "false" }?,
+ attribute recursive { "true" | "false" }?
+
+genshi.choose =
+ element py:choose { genshi.choose.attlist,
+ genshi.model
+ }
+genshi.when =
+ element py:when { genshi.when.attlist,
+ genshi.model
+ }
+genshi.otherwise =
+ element py:otherwise {
+ genshi.model
+ }
+genshi.if =
+ element py:if { genshi.if.attlist,
+ genshi.model
+ }
+genshi.for =
+ element py:for { genshi.for.attlist,
+ genshi.model
+ }
+genshi.def =
+ element py:def { genshi.def.attlist,
+ genshi.model
+ }
+genshi.with =
+ element py:with { genshi.with.attlist,
+ genshi.model
+ }
+genshi.match =
+ element py:match { genshi.match.attlist,
+ genshi.model
+ }
+genshi.replace =
+ element py:replace { genshi.replace.attlist,
+ genshi.model
+ }
+
+genshi.allowed.children = text
+
+genshi.class = genshi.if | genshi.choose | genshi.when | genshi.otherwise
+ | genshi.for | genshi.def | genshi.with | genshi.match | genshi.replace
+ | python.expression
+ | xi.include
+
+genshi.model = genshi.class* | genshi.allowed.children* \ No newline at end of file
diff --git a/emacs.d/nxhtml/etc/schema/mjt.rnc b/emacs.d/nxhtml/etc/schema/mjt.rnc
new file mode 100644
index 0000000..b37f01a
--- /dev/null
+++ b/emacs.d/nxhtml/etc/schema/mjt.rnc
@@ -0,0 +1,74 @@
+include "xhtml-loader.rnc"
+
+MjtAll.attrib =
+ attribute mjt.def { Text.datatype }?,
+ attribute mjt.when { Text.datatype }?,
+ attribute mjt.otherwise { Text.datatype }?,
+ attribute mjt.for { Text.datatype }?,
+ attribute mjt.if { Text.datatype }?,
+ attribute mjt.elif { Text.datatype }?,
+ attribute mjt.else { Text.datatype }?,
+ attribute mjt.script { Text.datatype }?,
+ attribute mjt.choose { Text.datatype }?,
+ attribute mjt.replace { Text.datatype }?,
+ attribute mjt.content { Text.datatype }?,
+ attribute mjt.strip { Text.datatype }?,
+ attribute mjt.src { Text.datatype }?,
+ attribute mjt.style { Text.datatype }?,
+ attribute mjt.class { Text.datatype }?,
+ attribute mjt.id { Text.datatype }?,
+ attribute mjt.attrs { Text.datatype }?,
+ attribute mjt.task { Text.datatype }?
+
+
+a.attlist &=
+ attribute mjt.onblur { Script.datatype }?,
+ attribute mjt.onfocus { Script.datatype }?
+area.attlist &=
+ attribute mjt.onblur { Script.datatype }?,
+ attribute mjt.onfocus { Script.datatype }?
+form.attlist &=
+ attribute mjt.onreset { Script.datatype }?,
+ attribute mjt.onsubmit { Script.datatype }?
+body.attlist &=
+ attribute mjt.onload { Script.datatype }?,
+ attribute mjt.onunload { Script.datatype }?
+label.attlist &=
+ attribute mjt.onblur { Script.datatype }?,
+ attribute mjt.onfocus { Script.datatype }?
+input.attlist &=
+ attribute mjt.onblur { Script.datatype }?,
+ attribute mjt.onchange { Script.datatype }?,
+ attribute mjt.onfocus { Script.datatype }?,
+ attribute mjt.onselect { Script.datatype }?
+select.attlist &=
+ attribute mjt.onblur { Script.datatype }?,
+ attribute mjt.onchange { Script.datatype }?,
+ attribute mjt.onfocus { Script.datatype }?
+textarea.attlist &=
+ attribute mjt.onblur { Script.datatype }?,
+ attribute mjt.onchange { Script.datatype }?,
+ attribute mjt.onfocus { Script.datatype }?,
+ attribute mjt.onselect { Script.datatype }?
+button.attlist &=
+ attribute mjt.onblur { Script.datatype }?,
+ attribute mjt.onfocus { Script.datatype }?
+
+MjtEvents.attrib =
+ attribute mjt.onclick { Script.datatype }?,
+ attribute mjt.ondblclick { Script.datatype }?,
+ attribute mjt.onmousedown { Script.datatype }?,
+ attribute mjt.onmouseup { Script.datatype }?,
+ attribute mjt.onmouseover { Script.datatype }?,
+ attribute mjt.onmousemove { Script.datatype }?,
+ attribute mjt.onmouseout { Script.datatype }?,
+ attribute mjt.onkeypress { Script.datatype }?,
+ attribute mjt.onkeydown { Script.datatype }?,
+ attribute mjt.onkeyup { Script.datatype }?
+
+
+Common.attrib &= MjtAll.attrib
+CommonIdRequired.attrib &= MjtAll.attrib
+
+Common.attrib &= MjtEvents.attrib
+CommonIdRequired.attrib &= MjtEvents.attrib
diff --git a/emacs.d/nxhtml/etc/schema/nxml-erb.patch b/emacs.d/nxhtml/etc/schema/nxml-erb.patch
new file mode 100644
index 0000000..362913b
--- /dev/null
+++ b/emacs.d/nxhtml/etc/schema/nxml-erb.patch
@@ -0,0 +1,37 @@
+--- nxml-mode-orig/xmltok.el 2005-10-16 15:32:53.000000000 -0400
++++ nxml-mode-erb/xmltok.el 2006-09-01 01:02:55.000000000 -0400
+@@ -496,6 +496,9 @@
+ (xmltok+ (xmltok-g markup-declaration "!")
+ (xmltok-g comment-first-dash "-"
+ (xmltok-g comment-open "-") opt) opt))
++ (erb-section
++ (xmltok+ "%"
++ (xmltok-g erb-section-open "[^%]") opt))
+ (cdata-section
+ (xmltok+ "!"
+ (xmltok-g marked-section-open "\\[")
+@@ -526,6 +529,7 @@
+ ;; by default
+ or cdata-section
+ or comment
++ or erb-section
+ or processing-instruction))
+ (xmltok-defregexp
+ xmltok-attribute
+@@ -693,6 +697,16 @@
+ nil
+ "]]>")
+ 'not-well-formed)))
++ ((xmltok-after-lt start erb-section-open)
++ (setq xmltok-type
++ (if (re-search-forward "[^%]%>" nil t)
++ 'erb-section
++ (xmltok-add-error "No closing %>")
++ (xmltok-add-dependent 'xmltok-unclosed-reparse-p
++ nil
++ nil
++ "%>")
++ 'not-well-formed)))
+ ((xmltok-after-lt start processing-instruction-question)
+ (xmltok-scan-after-processing-instruction-open))
+ ((xmltok-after-lt start comment-open)
diff --git a/emacs.d/nxhtml/etc/schema/old-genshi.rnc b/emacs.d/nxhtml/etc/schema/old-genshi.rnc
new file mode 100644
index 0000000..5a50385
--- /dev/null
+++ b/emacs.d/nxhtml/etc/schema/old-genshi.rnc
@@ -0,0 +1,31 @@
+namespace py = "http://genshi.edgewall.org/"
+
+genshi.expr-type = xsd:string { minLength = "1" }
+genshi.with-type = xsd:string { minLength = "1" }
+genshi.choose-type = xsd:string
+genshi.def-type = xsd:string
+genshi.xpath-type = xsd:anyURI
+
+genshi.attrib = attribute py:if { genshi.expr-type }?,
+ attribute py:choose { genshi.choose-type }?,
+ attribute py:when { genshi.expr-type }?,
+ attribute py:otherwise { genshi.expr-type }?,
+ attribute py:for { genshi.expr-type }?,
+ attribute py:def { genshi.def-type }?,
+ attribute py:match { genshi.xpath-type }?,
+ attribute py:with { genshi.with-type }?,
+ attribute py:attrs { genshi.expr-type }?,
+ attribute py:content { genshi.expr-type }?,
+ attribute py:replace { genshi.expr-type }?,
+ attribute py:strip { genshi.expr-type }?
+
+genshi.if.attlist = attribute test { genshi.expr-type }
+genshi.for.attlist = attribute each { genshi.expr-type }
+genshi.def.attlist = attribute function { genshi.expr-type }
+genshi.with.attlist = attribute vars { genshi.with-type }
+genshi.match.attlist = attribute path { genshi.xpath-type },
+ attribute buffer { genshi.expr-type }?,
+ attribute once { genshi.expr-type }?,
+ attribute recursive { genshi.expr-type }?
+
+
diff --git a/emacs.d/nxhtml/etc/schema/old-qtmstr-xhtml.rnc b/emacs.d/nxhtml/etc/schema/old-qtmstr-xhtml.rnc
new file mode 100644
index 0000000..b5f84bd
--- /dev/null
+++ b/emacs.d/nxhtml/etc/schema/old-qtmstr-xhtml.rnc
@@ -0,0 +1,61 @@
+namespace py = "http://genshi.edgewall.org/"
+namespace xi = "http://www.w3.org/2001/XInclude"
+
+include "genshi.rnc"
+include "xinclude.rnc"
+include "xhtml-loader.rnc"
+
+start |= head|body|p|\div|h1|h2|h3|h4|h5|h6|hr|pre|dl|ol|ul|table|form
+
+Common.attrib &= genshi.attrib
+head.attlist &= genshi.attrib
+html.attlist &= genshi.attrib
+
+Head.class = base | isindex | link | meta | script | title | style |
+ if-head | for-head | def-head | with-head
+
+Head.model = Head.class*
+
+head.content &= Head.model*
+
+if-inline = element py:if { genshi.if.attlist, Inline.model }
+if-block = element py:if { genshi.if.attlist, Block.model }
+if-head = element py:if { genshi.if.attlist, Head.model }
+for-inline = element py:for { genshi.for.attlist, Inline.model }
+for-block = element py:for { genshi.for.attlist, Block.model }
+for-head = element py:for { genshi.for.attlist, Head.model }
+def-inline = element py:def { genshi.def.attlist, Inline.model }
+def-block = element py:def { genshi.def.attlist, Block.model }
+def-head = element py:def { genshi.def.attlist, Head.model }
+with-inline = element py:with { genshi.with.attlist, Inline.model }
+with-block = element py:with { genshi.with.attlist, Block.model }
+with-head = element py:with { genshi.with.attlist, Head.model }
+match-inline = element py:match { genshi.match.attlist, Inline.model }
+match-block = element py:match { genshi.match.attlist, Block.model }
+match-head = element py:match { genshi.match.attlist, Head.model }
+
+Inline.class |= if-inline | for-inline | def-inline | with-inline | match-inline
+Block.class |= if-block | for-block | def-block | with-block | match-block
+
+xi-inline = element xi:include {
+ xinclude.include.attlist,
+ element xi:fallback { genshi.attrib,
+ (xi-inline | Inline.model)*
+ }?
+ }
+
+xi-block = element xi:include { xinclude.include.attlist,
+ element xi:fallback { genshi.attrib,
+ (xi-block | Block.model)*
+ }?
+ }
+
+xi-head = element xi:include { xinclude.include.attlist,
+ element xi:fallback { genshi.attrib,
+ (xi-head | Head.model)*
+ }?
+ }
+
+Inline.class |= xi-inline
+Block.class |= xi-block
+Head.class |= xi-head
diff --git a/emacs.d/nxhtml/etc/schema/old-xinclude.rnc b/emacs.d/nxhtml/etc/schema/old-xinclude.rnc
new file mode 100644
index 0000000..c45cf0c
--- /dev/null
+++ b/emacs.d/nxhtml/etc/schema/old-xinclude.rnc
@@ -0,0 +1,11 @@
+namespace xi = "http://www.w3.org/2001/XInclude"
+namespace local = ""
+
+xinclude.include.attlist =
+ attribute href { xsd:anyURI }?,
+ attribute parse { xsd:string }?,
+ attribute xpointer { xsd:string }?,
+ attribute encoding { xsd:string }?,
+ attribute accept { xsd:string }?,
+ attribute accept-language { xsd:string }?
+
diff --git a/emacs.d/nxhtml/etc/schema/qtmstr-xhtml-old.rnc b/emacs.d/nxhtml/etc/schema/qtmstr-xhtml-old.rnc
new file mode 100644
index 0000000..61ab89e
--- /dev/null
+++ b/emacs.d/nxhtml/etc/schema/qtmstr-xhtml-old.rnc
@@ -0,0 +1,58 @@
+namespace py = "http://genshi.edgewall.org/"
+namespace xi = "http://www.w3.org/2001/XInclude"
+
+include "genshi.rnc"
+include "xinclude.rnc"
+include "xhtml-loader.rnc"
+
+start |= head|body|p|\div|h1|h2|h3|h4|h5|h6|hr|pre|dl|ol|ul|table|form
+
+Common.attrib &= genshi.attrib
+head.attlist &= genshi.attrib
+html.attlist &= genshi.attrib
+
+Head.class = base | isindex | link | meta | script | title | style |
+ if-head | for-head | def-head | with-head
+
+Head.model = Head.class*
+
+head.content &= Head.model*
+
+if-inline = element py:if { genshi.if.attlist, Inline.model }
+if-block = element py:if { genshi.if.attlist, Block.model }
+if-head = element py:if { genshi.if.attlist, Head.model }
+for-inline = element py:for { genshi.for.attlist, Inline.model }
+for-block = element py:for { genshi.for.attlist, Block.model }
+for-head = element py:for { genshi.for.attlist, Head.model }
+def-inline = element py:def { genshi.def.attlist, Inline.model }
+def-block = element py:def { genshi.def.attlist, Block.model }
+def-head = element py:def { genshi.def.attlist, Head.model }
+with-inline = element py:with { genshi.with.attlist, Inline.model }
+with-block = element py:with { genshi.with.attlist, Block.model }
+with-head = element py:with { genshi.with.attlist, Head.model }
+
+Inline.class |= if-inline | for-inline | def-inline | with-inline
+Block.class |= if-block | for-block | def-block | with-block
+
+xi-inline = element xi:include {
+ xinclude.include.attlist,
+ element xi:fallback { genshi.attrib,
+ (xi-inline | Inline.model)*
+ }?
+ }
+
+xi-block = element xi:include { xinclude.include.attlist,
+ element xi:fallback { genshi.attrib,
+ (xi-block | Block.model)*
+ }?
+ }
+
+xi-head = element xi:include { xinclude.include.attlist,
+ element xi:fallback { genshi.attrib,
+ (xi-head | Head.model)*
+ }?
+ }
+
+Inline.class |= xi-inline
+Block.class |= xi-block
+Head.class |= xi-head
diff --git a/emacs.d/nxhtml/etc/schema/qtmstr-xhtml.rnc b/emacs.d/nxhtml/etc/schema/qtmstr-xhtml.rnc
new file mode 100644
index 0000000..ff5d0a9
--- /dev/null
+++ b/emacs.d/nxhtml/etc/schema/qtmstr-xhtml.rnc
@@ -0,0 +1,66 @@
+default namespace = "http://www.w3.org/1999/xhtml"
+
+include "genshi.rnc"
+include "xhtml-loader.rnc" {
+ start = html | head | head.content | body | frameset | frame | noframes |
+ Block.class | Inline.class | Table.class | Form.extra.class | genshi.class
+ html = element html { html.attlist, (genshi.model | (head, (body | frameset | genshi.model))) }
+ frameset =
+ element frameset {
+ frameset.attlist,
+ (((frameset | frame)+ & noframes?) | genshi.model)
+ }
+ noframes = element noframes { noframes.attlist, (body | genshi.model) }
+ title = element title { title.attlist, (text | genshi.model)* }
+ script = element script { script.attlist, (text | genshi.model)* }
+ style = element style { style.attlist, (text | genshi.model)* }
+ dl = element dl { dl.attlist, ((dt | dd)+ | genshi.model) }
+ ol = element ol { ol.attlist, (li+ | genshi.model) }
+ ul = element ul { ul.attlist, (li+ | genshi.model) }
+ dir = element dir { dir.attlist, (li.noblock+ | genshi.model) }
+ menu = element menu { menu.attlist, (li.noblock+ | genshi.model) }
+ select = element select { select.attlist, ((option | optgroup)+ | genshi.model) }
+ option =
+ element option {
+ Common.attrib,
+ attribute selected { "selected" }?,
+ attribute value { text }?,
+ (text | genshi.model)*
+ }
+ textarea = element textarea { textarea.attlist, (text & genshi.model)* }
+ optgroup = element optgroup { optgroup.attlist, (option+ | genshi.model) }
+ table =
+ element table {
+ table.attlist,
+ (caption? | genshi.model),
+ (col* | colgroup* | genshi.model),
+ (((thead? | genshi.model),
+ (tfoot? | genshi.model),
+ (tbody+ | genshi.model)) | (tr+ | genshi.model))
+ }
+ colgroup = element colgroup { colgroup.attlist, (col* | genshi.model) }
+ tr = element tr { tr.attlist, ((th | td)+ | genshi.model) }
+ tbody = element tbody { tbody.attlist, (tr+ | genshi.model) }
+ thead = element thead { thead.attlist, (tr+ | genshi.model) }
+ tfoot = element tfoot { tfoot.attlist, (tr+ | genshi.model) }
+}
+
+Table.class = caption | colgroup | col | tbody | thead | tfoot | th | tr | td
+Form.extra.class = option | optgroup | legend
+
+Block.class |= genshi.class
+Inline.class |= genshi.class
+head.content &= genshi.class
+
+Core.attrib &= genshi.attrib
+html.attlist &= genshi.attrib
+head.attlist &= genshi.attrib
+title.attlist &= genshi.attrib
+base.attlist &= genshi.attrib
+meta.attlist &= genshi.attrib
+script.attlist &= genshi.attrib
+param.attlist &= genshi.attrib
+Edit.attrib &= genshi.attrib
+
+genshi.allowed.children |= html | head | head.content | body | frameset | frame
+ | noframes | Inline.class | Block.class | Table.class | Form.extra.class
diff --git a/emacs.d/nxhtml/etc/schema/schema-path-patch.el b/emacs.d/nxhtml/etc/schema/schema-path-patch.el
new file mode 100644
index 0000000..a6d59fc
--- /dev/null
+++ b/emacs.d/nxhtml/etc/schema/schema-path-patch.el
@@ -0,0 +1,95 @@
+;;; schema-path-patch.el --- Patch schema paths
+;;
+;; Author: Lennart Borgman (lennart O borgman A gmail O com)
+;; Created: 2008-08-08T20:21:31+0200 Fri
+;; Version: 0.2
+;; Last-Updated: 2008-08-19T00:21:25+0200 Mon
+;; URL:
+;; Keywords:
+;; Compatibility:
+;;
+;; Features that might be required by this library:
+;;
+;; Cannot open load file: schema-path-patch.
+;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;
+;;; Commentary:
+;;
+;; Schemas here may include parts from nxml and need to know the path.
+;; This file can be used to patch the paths.
+;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;
+;;; Change log:
+;;
+;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;
+;; This program is free software; you can redistribute it and/or
+;; modify it under the terms of the GNU General Public License as
+;; published by the Free Software Foundation; either version 2, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+;; General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with this program; see the file COPYING. If not, write to
+;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
+;; Floor, Boston, MA 02110-1301, USA.
+;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;
+;;; Code:
+
+(defvar rncpp-this-dir
+ (file-name-as-directory
+ (file-name-directory
+ (if load-file-name load-file-name buffer-file-name))))
+
+(defun rncpp-get-nxml-schema-dir ()
+ ;; First look for nxml-mode included with Emacs
+ (let ((schema-dir (file-name-as-directory
+ (expand-file-name "schema" data-directory))))
+ (unless (file-directory-p schema-dir)
+ ;; This is an old nxml-mode, look for its schemas dir.
+ (let ((nxml-mode-dir (file-name-as-directory
+ (file-name-directory (locate-library "nxml-mode")))))
+ (setq schema-dir (file-name-as-directory
+ (expand-file-name "schema" nxml-mode-dir)))))
+ (unless (file-directory-p schema-dir)
+ (error "Can't find schema-dir=%s" schema-dir))
+ schema-dir))
+
+;; Use xhtml-loader.rnc (an idea from Bryan Waite):
+(defun rncpp-patch-xhtml-loader ()
+ "Patch xhtml-loader.rnc so genshi and mjt rnc files works."
+ ;;(interactive)
+ (let* ((default-directory rncpp-this-dir)
+ (loader-path (expand-file-name "xhtml-loader.rnc"))
+ (loader-buf (find-buffer-visiting loader-path))
+ (schema-dir (rncpp-get-nxml-schema-dir))
+ (schema-relative-dir (file-relative-name schema-dir))
+ (loader-string (concat "include \""
+ schema-relative-dir
+ "xhtml.rnc\"\n")))
+ (when loader-buf (kill-buffer loader-buf))
+ (setq loader-buf (find-file-noselect loader-path))
+ (with-current-buffer loader-buf
+ (unless (file-exists-p loader-path)
+ (insert loader-string))
+ ;; Test if correct
+ (if (string= (buffer-substring-no-properties (point-min) (point-max))
+ loader-string)
+ (message "xhtml-loader.rnc was ok")
+ (message "Patching xhtml-loader.rnc")
+ (delete-region (point-min) (point-max))
+ (insert loader-string))
+ (basic-save-buffer)
+ (kill-buffer (current-buffer)))))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; schema-path-patch.el ends here
diff --git a/emacs.d/nxhtml/etc/schema/xhtml-loader.rnc b/emacs.d/nxhtml/etc/schema/xhtml-loader.rnc
new file mode 100644
index 0000000..a40f3cf
--- /dev/null
+++ b/emacs.d/nxhtml/etc/schema/xhtml-loader.rnc
@@ -0,0 +1 @@
+include "../../../../../../usr/local/share/emacs/24.0.50/etc/schema/xhtml.rnc"
diff --git a/emacs.d/nxhtml/etc/schema/xinclude.rnc b/emacs.d/nxhtml/etc/schema/xinclude.rnc
new file mode 100644
index 0000000..cbda979
--- /dev/null
+++ b/emacs.d/nxhtml/etc/schema/xinclude.rnc
@@ -0,0 +1,35 @@
+default namespace = "http://www.w3.org/2001/XInclude"
+namespace xi = "http://www.w3.org/2001/XInclude"
+
+xi.include.attlist =
+ attribute href { xsd:anyURI }?,
+ attribute parse { "xml" | "text" }?,
+ attribute xpointer { xsd:string }?,
+ attribute encoding { xsd:string }?,
+ attribute accept { xsd:string }?,
+ attribute accept-language { xsd:string }?
+
+xi.include.attlist.extra =
+ attribute * - xi.include.attlist { text }*
+
+xi.include =
+ element xi:include {
+ xi.include.attlist,
+ xi.include.attlist.extra,
+ (xi.fallback? | xi.include.extra)*
+ }
+
+xi.include.extra = notAllowed
+
+xi.fallback.attlist =
+ attribute * { text }*
+
+xi.fallback =
+ element xi:fallback {
+ xi.fallback.attlist,
+ (xi.include | xi.fallback.extra)*
+ }
+
+xi.fallback.extra = notAllowed
+
+xi.class = xi.include | xi.fallback \ No newline at end of file