]> granicus.if.org Git - docbook-dsssl/commitdiff
Initial checkin
authorNorman Walsh <ndw@nwalsh.com>
Sun, 24 Apr 2005 17:57:35 +0000 (17:57 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Sun, 24 Apr 2005 17:57:35 +0000 (17:57 +0000)
20 files changed:
docbook/relaxng/slides/.cvsignore [new file with mode: 0644]
docbook/relaxng/slides/Makefile [new file with mode: 0644]
docbook/relaxng/slides/build/.cvsignore [new file with mode: 0644]
docbook/relaxng/slides/build/Makefile [new file with mode: 0644]
docbook/relaxng/slides/src/foils.rnc [new file with mode: 0644]
docbook/relaxng/slides/src/slides-full.rnc [new file with mode: 0644]
docbook/relaxng/slides/src/slides.rnc [new file with mode: 0644]
docbook/relaxng/slides/tests/minimal.xml [new file with mode: 0644]
docbook/relaxng/slides/tests/test-full.xml [new file with mode: 0644]
docbook/relaxng/slides/tests/test.xml [new file with mode: 0644]
docbook/relaxng/website/.cvsignore [new file with mode: 0644]
docbook/relaxng/website/Makefile [new file with mode: 0644]
docbook/relaxng/website/build/.cvsignore [new file with mode: 0644]
docbook/relaxng/website/build/Makefile [new file with mode: 0644]
docbook/relaxng/website/src/rddl.rnc [new file with mode: 0644]
docbook/relaxng/website/src/webpages.rnc [new file with mode: 0644]
docbook/relaxng/website/src/website-full.rnc [new file with mode: 0644]
docbook/relaxng/website/src/website.rnc [new file with mode: 0644]
docbook/relaxng/website/tests/example.xml [new file with mode: 0644]
docbook/relaxng/website/tests/form.xml [new file with mode: 0644]

diff --git a/docbook/relaxng/slides/.cvsignore b/docbook/relaxng/slides/.cvsignore
new file mode 100644 (file)
index 0000000..1d06e7c
--- /dev/null
@@ -0,0 +1,7 @@
+semantic.cache
+slides.dtd
+slides.rnc
+slides.rng
+slides-full.dtd
+slides-full.rnc
+slides-full.rng
diff --git a/docbook/relaxng/slides/Makefile b/docbook/relaxng/slides/Makefile
new file mode 100644 (file)
index 0000000..b4907e5
--- /dev/null
@@ -0,0 +1,50 @@
+VPATH=src
+
+.SUFFIXES: .rnc .rng .rnx .dtx .dtd
+.PHONY: tests html
+
+DOCBOOK=../docbook
+TOOLS=../tools
+RNGFILES=$(wildcard build/*.rng)
+
+all: slides.rng slides.dtd slides-full.rng slides-full.dtd
+
+# ============================================================
+#
+# N.B. We need an explicit dependency on src/*.rnc for each *.rng
+#      file because the build process produces an *output* RNC file
+#      in the current directory and that's not the one we want to
+#      depend on.
+#
+#      That's also the reason for the curious sleep/touch pattern
+#      in the build rules. We want to make sure that the output RNC
+#      file is older than the output RNG file so that make doesn't
+#      always think it needs to rebuild the RNG file.
+#
+#      If we could take "." out of VPATH, we wouldn't need to do this.
+
+slides.rng: src/slides.rnc
+slides-full.rng: src/slides-full.rnc
+
+.rnc.rng:
+       $(MAKE) -C build $@
+       perl $(TOOLS)/trimgrammar.pl -o ,$@ build/$@
+       saxon ,$@ $(TOOLS)/trimgrammar.xsl $@ use.extensions=1
+       trang $@ `basename $<`
+       sleep 2
+       touch $@
+       rm -f ,$@
+
+.rng.rnx:
+       xsltproc -output $@ $(TOOLS)/rngdocxml.xsl $<
+
+.rnx.dtx:
+       xsltproc -output $@ $(TOOLS)/doc2dtd.xsl $<
+
+.dtx.dtd:
+       xsltproc -output $@ $(TOOLS)/xml2dtd.xsl $<
+
+# ============================================================
+
+clean:
+       rm -f slides*
diff --git a/docbook/relaxng/slides/build/.cvsignore b/docbook/relaxng/slides/build/.cvsignore
new file mode 100644 (file)
index 0000000..c386882
--- /dev/null
@@ -0,0 +1 @@
+*.rng
diff --git a/docbook/relaxng/slides/build/Makefile b/docbook/relaxng/slides/build/Makefile
new file mode 100644 (file)
index 0000000..a01a3a8
--- /dev/null
@@ -0,0 +1,22 @@
+VPATH=../src
+
+TOOLS=../../tools
+
+AUGMENT=$(TOOLS)/augment.xsl
+INCLUDE=$(TOOLS)/include.xsl
+CLEANUP=$(TOOLS)/cleanup.pl
+
+.SUFFIXES: .rng .rnc
+
+all:
+       @echo Make what?
+
+.rnc.rng:
+       trang -O rng $< $@
+       saxon $@ $(INCLUDE) ,$@ use.extensions=1
+       saxon ,$@ $(AUGMENT) $@ use.extensions=1
+       perl -i $(CLEANUP) $@
+       rm -f ,$@
+
+clean:
+       rm -f *.rng
diff --git a/docbook/relaxng/slides/src/foils.rnc b/docbook/relaxng/slides/src/foils.rnc
new file mode 100644 (file)
index 0000000..d790df2
--- /dev/null
@@ -0,0 +1,112 @@
+# This file is part of Slides NG
+
+# This schema is a reinterpretation of "Slides" in the NG framework.
+#
+# Author: Norman Walsh, <ndw@nwalsh.com>
+# Source: Derived from Slides 3.3.1
+# Release: $Id$
+#
+# ======================================================================
+
+namespace ctrl = "http://nwalsh.com/xmlns/schema-control/"
+namespace rng  = "http://relaxng.org/ns/structure/1.0"
+namespace s = "http://www.ascc.net/xml/schematron"
+namespace db = "http://docbook.org/ns/docbook"
+default namespace = "http://docbook.org/ns/docbook"
+
+[
+   db:refname [ "slides" ]
+   db:refpurpose [ "A set of slides (or foils)" ]
+]
+div {
+
+   sl.slides.role.attribute = attribute role { text }
+
+   sl.slides.attlist =
+      sl.slides.role.attribute?
+    & db.common.attributes
+
+   sl.slides.info = db._info.title.req
+
+   sl.slides =
+      element slides {
+         sl.slides.attlist,
+         sl.slides.info,
+         db.all.blocks*,
+         sl.foil*,
+         sl.foilgroup*
+      }
+}
+
+# ======================================================================
+
+[
+   db:refname [ "foilgroup" ]
+   db:refpurpose [ "A group of slides (or foils)" ]
+]
+div {
+
+   sl.foilgroup.role.attribute = attribute role { text }
+
+   sl.foilgroup.attlist =
+      sl.foilgroup.role.attribute?
+    & db.status.attribute?
+    & db.common.attributes
+
+   sl.foilgroup.info = db._info.title.req
+
+   sl.foilgroup =
+      element foilgroup {
+         sl.foilgroup.attlist,
+         sl.foilgroup.info,
+         (db.all.blocks|db.navigation.components)*,
+         sl.foil+
+      }
+}
+
+# ======================================================================
+
+[
+   db:refname [ "foil" ]
+   db:refpurpose [ "A slide (or foil)" ]
+]
+div {
+
+   sl.foil.role.attribute = attribute role { text }
+
+   sl.foil.attlist =
+      sl.foil.role.attribute?
+    & db.status.attribute?
+    & db.common.attributes
+
+   sl.foil.info = db._info.title.req
+
+   sl.foil =
+      element foil {
+         sl.foil.attlist,
+         sl.foil.info,
+         (db.all.blocks|db.navigation.components)+
+      }
+}
+
+# ======================================================================
+
+[
+   db:refname [ "speakernotes" ]
+   db:refpurpose [ "Speaker notes" ]
+]
+div {
+
+   sl.speakernotes.role.attribute = attribute role { text }
+
+   sl.speakernotes.attlist =
+      sl.speakernotes.role.attribute?
+    & db.status.attribute?
+    & db.common.attributes
+
+   sl.speakernotes =
+      element speakernotes {
+         sl.speakernotes.attlist,
+         db.all.blocks+
+      }
+}
diff --git a/docbook/relaxng/slides/src/slides-full.rnc b/docbook/relaxng/slides/src/slides-full.rnc
new file mode 100644 (file)
index 0000000..b0fb3c6
--- /dev/null
@@ -0,0 +1,22 @@
+# This file is part of Slides NG
+
+# This schema is a reinterpretation of "Slides" in the NG framework.
+#
+# Author: Norman Walsh, <ndw@nwalsh.com>
+# Source: Derived from Slides 3.3.1
+# Release: $Id$
+#
+# ======================================================================
+
+namespace ctrl = "http://nwalsh.com/xmlns/schema-control/"
+namespace rng  = "http://relaxng.org/ns/structure/1.0"
+namespace s = "http://www.ascc.net/xml/schematron"
+namespace db = "http://docbook.org/ns/docbook"
+default namespace = "http://docbook.org/ns/docbook"
+
+include "../../docbook/src/docbook.rnc" {
+   start = sl.slides
+   db.all.blocks |= sl.speakernotes
+}
+
+include "foils.rnc"
diff --git a/docbook/relaxng/slides/src/slides.rnc b/docbook/relaxng/slides/src/slides.rnc
new file mode 100644 (file)
index 0000000..a674f83
--- /dev/null
@@ -0,0 +1,22 @@
+# This file is part of Slides NG
+
+# This schema is a reinterpretation of "Slides" in the NG framework.
+#
+# Author: Norman Walsh, <ndw@nwalsh.com>
+# Source: Derived from Slides 3.3.1
+# Release: $Id$
+#
+# ======================================================================
+
+namespace ctrl = "http://nwalsh.com/xmlns/schema-control/"
+namespace rng  = "http://relaxng.org/ns/structure/1.0"
+namespace s = "http://www.ascc.net/xml/schematron"
+namespace db = "http://docbook.org/ns/docbook"
+default namespace = "http://docbook.org/ns/docbook"
+
+include "../../simple/src/sdocbook.rnc" {
+   start = sl.slides
+   db.all.blocks |= sl.speakernotes
+}
+
+include "foils.rnc"
diff --git a/docbook/relaxng/slides/tests/minimal.xml b/docbook/relaxng/slides/tests/minimal.xml
new file mode 100644 (file)
index 0000000..22f7b48
--- /dev/null
@@ -0,0 +1,15 @@
+<?xml version='1.0'?>
+<slides xmlns="http://docbook.org/ns/docbook">
+<info>
+<title>Presentation Title</title>
+</info>
+<foilgroup><title>Foilgroup Title</title>
+<subtitle>Foilgroup Subtitle</subtitle>
+<para>Some premable.</para>
+<foil><title>Foil Title</title>
+<subtitle>Foil Subtitle</subtitle>
+<para>Foil content</para>
+</foil>
+</foilgroup>
+</slides>
+
diff --git a/docbook/relaxng/slides/tests/test-full.xml b/docbook/relaxng/slides/tests/test-full.xml
new file mode 100644 (file)
index 0000000..509eff9
--- /dev/null
@@ -0,0 +1,37 @@
+<?xml version='1.0'?>
+<slides xmlns="http://docbook.org/ns/docbook">
+<info>
+  <title>Test Slides Title</title>
+  <copyright><year>2001</year><holder>Norman Walsh</holder></copyright>
+</info>
+
+<foilgroup><title>Section 1</title>
+
+<foil><title>Test Slides Title 1</title>
+<para>...<keycombo><keycap>X</keycap></keycombo></para>
+</foil>
+
+<foil><title>Test Slides Title 2</title>
+<para>...</para>
+<screen>
+this is a screen
+</screen>
+</foil>
+
+</foilgroup>
+<foilgroup><title>Section 2</title>
+
+<foil><title>Test Slides Title 1</title>
+<para>...</para>
+</foil>
+
+<foil><title>Test Slides Title 2</title>
+<para>...</para>
+<screen>
+this is a screen
+</screen>
+</foil>
+
+</foilgroup>
+
+</slides>
diff --git a/docbook/relaxng/slides/tests/test.xml b/docbook/relaxng/slides/tests/test.xml
new file mode 100644 (file)
index 0000000..f3cc5ad
--- /dev/null
@@ -0,0 +1,123 @@
+<?xml version='1.0'?>
+<?dbhtml graphics-dir="../graphics"?>
+<?dbhtml css-stylesheet="../browser/slides.css"?>
+<?dbhtml script-dir="../browser"?>
+<slides xmlns="http://docbook.org/ns/docbook">
+<info>
+  <title>Test Slides Title That's Really Really Long and Would Never Really Be Used Exactly Like This</title>
+  <copyright><year>2001</year><holder>Norman Walsh</holder></copyright>
+</info>
+
+<speakernotes>
+<para>Welcome the audience</para>
+</speakernotes>
+
+<foilgroup><title>Foilgroup 1</title>
+
+<speakernotes>
+<para>Introduce the foilgroup</para>
+</speakernotes>
+
+<foil><title>Test Slides Title 1</title>
+
+<speakernotes>
+<para>Tell a funny joke. Remember, I said a funny one.</para>
+</speakernotes>
+
+<para>...</para>
+</foil>
+
+<foil><title>Test Slides Title 2</title>
+<para>...</para>
+<programlisting>
+this is a programlisting
+</programlisting>
+
+<programlisting>
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+this is a long programlisting
+</programlisting>
+</foil>
+
+</foilgroup>
+<foilgroup><title>Foilgroup 2</title>
+
+<foil><title>Test Slides Title 1</title>
+<para>...<footnote><para>This is a footnote.</para></footnote></para>
+</foil>
+
+<foil><title>Test Slides Title 2</title>
+<para>...</para>
+<programlisting>
+this is a programlisting
+</programlisting>
+</foil>
+
+</foilgroup>
+
+</slides>
diff --git a/docbook/relaxng/website/.cvsignore b/docbook/relaxng/website/.cvsignore
new file mode 100644 (file)
index 0000000..dffa87f
--- /dev/null
@@ -0,0 +1,7 @@
+semantic.cache
+website-full.dtd
+website-full.rnc
+website-full.rng
+website.dtd
+website.rnc
+website.rng
diff --git a/docbook/relaxng/website/Makefile b/docbook/relaxng/website/Makefile
new file mode 100644 (file)
index 0000000..5f63047
--- /dev/null
@@ -0,0 +1,50 @@
+VPATH=src
+
+.SUFFIXES: .rnc .rng .rnx .dtx .dtd
+.PHONY: tests html
+
+DOCBOOK=../docbook
+TOOLS=../tools
+RNGFILES=$(wildcard build/*.rng)
+
+all: website.rng website.dtd website-full.rng website-full.dtd
+
+# ============================================================
+#
+# N.B. We need an explicit dependency on src/*.rnc for each *.rng
+#      file because the build process produces an *output* RNC file
+#      in the current directory and that's not the one we want to
+#      depend on.
+#
+#      That's also the reason for the curious sleep/touch pattern
+#      in the build rules. We want to make sure that the output RNC
+#      file is older than the output RNG file so that make doesn't
+#      always think it needs to rebuild the RNG file.
+#
+#      If we could take "." out of VPATH, we wouldn't need to do this.
+
+website.rng: src/website.rnc
+website-full.rng: src/website-full.rnc
+
+.rnc.rng:
+       $(MAKE) -C build $@
+       perl $(TOOLS)/trimgrammar.pl -o ,$@ build/$@
+       saxon ,$@ $(TOOLS)/trimgrammar.xsl $@ use.extensions=1
+       trang $@ `basename $<`
+       sleep 2
+       touch $@
+       rm -f ,$@
+
+.rng.rnx:
+       xsltproc -output $@ $(TOOLS)/rngdocxml.xsl $<
+
+.rnx.dtx:
+       xsltproc -output $@ $(TOOLS)/doc2dtd.xsl $<
+
+.dtx.dtd:
+       xsltproc -output $@ $(TOOLS)/xml2dtd.xsl $<
+
+# ============================================================
+
+clean:
+       rm -f website*
diff --git a/docbook/relaxng/website/build/.cvsignore b/docbook/relaxng/website/build/.cvsignore
new file mode 100644 (file)
index 0000000..c386882
--- /dev/null
@@ -0,0 +1 @@
+*.rng
diff --git a/docbook/relaxng/website/build/Makefile b/docbook/relaxng/website/build/Makefile
new file mode 100644 (file)
index 0000000..a01a3a8
--- /dev/null
@@ -0,0 +1,22 @@
+VPATH=../src
+
+TOOLS=../../tools
+
+AUGMENT=$(TOOLS)/augment.xsl
+INCLUDE=$(TOOLS)/include.xsl
+CLEANUP=$(TOOLS)/cleanup.pl
+
+.SUFFIXES: .rng .rnc
+
+all:
+       @echo Make what?
+
+.rnc.rng:
+       trang -O rng $< $@
+       saxon $@ $(INCLUDE) ,$@ use.extensions=1
+       saxon ,$@ $(AUGMENT) $@ use.extensions=1
+       perl -i $(CLEANUP) $@
+       rm -f ,$@
+
+clean:
+       rm -f *.rng
diff --git a/docbook/relaxng/website/src/rddl.rnc b/docbook/relaxng/website/src/rddl.rnc
new file mode 100644 (file)
index 0000000..d7fe37d
--- /dev/null
@@ -0,0 +1,50 @@
+# This file is part of Website NG
+
+# This schema is a reinterpretation of "Website" in the NG framework.
+#
+# Author: Norman Walsh, <ndw@nwalsh.com>
+# Source: Derived from Website 2.6.0
+# Release: $Id$
+#
+# ======================================================================
+
+namespace ctrl = "http://nwalsh.com/xmlns/schema-control/"
+namespace rng  = "http://relaxng.org/ns/structure/1.0"
+namespace s = "http://www.ascc.net/xml/schematron"
+namespace db = "http://docbook.org/ns/docbook"
+namespace rddl = "http://www.rddl.org/"
+namespace xlink = "http://www.w3.org/1999/xlink"
+default namespace = "http://docbook.org/ns/docbook"
+
+[
+   db:refname [ "rddl:resource" ]
+   db:refpurpose [ "A RDDL resource" ]
+]
+div {
+
+   rddl.resource.type.attribute = db.xlink.type.attribute
+   rddl.resource.arcrole.attribute = db.xlink.arcrole.attribute
+   rddl.resource.role.attribute = db.xlink.role.attribute
+   rddl.resource.href.attribute = db.xlink.href.attribute
+   rddl.resource.title.attribute = db.xlink.title.attribute?
+   rddl.resource.show.attribute = attribute xlink:show { "none" }
+   rddl.resource.actuate.attribute = attribute xlink:actuate { "none" }
+
+   # role default = "http://www.rddl.org/#resource"
+
+   rddl.resource.attlist =
+      rddl.resource.type.attribute?
+    & rddl.resource.arcrole.attribute?
+    & rddl.resource.role.attribute?
+    & rddl.resource.href.attribute?
+    & rddl.resource.title.attribute?
+    & rddl.resource.show.attribute?
+    & rddl.resource.actuate.attribute?
+    & db.common.idreq.attributes
+
+   rddl.resource =
+      element rddl:resource {
+         rddl.resource.attlist,
+         db.all.inlines*
+      }
+}
diff --git a/docbook/relaxng/website/src/webpages.rnc b/docbook/relaxng/website/src/webpages.rnc
new file mode 100644 (file)
index 0000000..677093b
--- /dev/null
@@ -0,0 +1,289 @@
+# This file is part of Website NG
+
+# This schema is a reinterpretation of "Website" in the NG framework.
+#
+# Author: Norman Walsh, <ndw@nwalsh.com>
+# Source: Derived from Website 2.6.0
+# Release: $Id$
+#
+# ======================================================================
+
+namespace ctrl = "http://nwalsh.com/xmlns/schema-control/"
+namespace rng  = "http://relaxng.org/ns/structure/1.0"
+namespace s = "http://www.ascc.net/xml/schematron"
+namespace db = "http://docbook.org/ns/docbook"
+default namespace = "http://docbook.org/ns/docbook"
+
+[
+   db:refname [ "webpage" ]
+   db:refpurpose [ "A page in a website" ]
+]
+div {
+
+   ws.webpage.role.attribute = attribute role { text }
+   ws.webpage.navto.attribute = attribute navto { "yes" | "no" }
+
+   ws.webpage.optional.components = db.section*
+   ws.webpage.required.components = db.section+
+
+   ws.webpage.attlist =
+      ws.webpage.role.attribute?
+    & ws.webpage.navto.attribute?
+    & db.common.idreq.attributes
+
+   ws.webpage =
+      element webpage {
+         ws.webpage.attlist,
+         ws.config*,
+         ws.head,
+         ((db.all.blocks+,
+            ws.webpage.optional.components)
+          | ws.webpage.required.components),
+         db.appendix*,
+         db.bibliography*
+      }
+}
+
+# ============================================================
+
+ws.head.optional.components =
+   db.abstract
+ | db.author
+ | db.copyright
+ | db.edition
+ | ws.headlink
+ | ws.meta
+ | ws.script
+ | ws.style
+ | db.revhistory
+
+[
+   db:refname [ "head" ]
+   db:refpurpose [ "The head in a webpage" ]
+]
+div {
+
+   ws.head.role.attribute = attribute role { text }
+
+   ws.head.attlist =
+      ws.head.role.attribute?
+    & db.common.attributes
+
+   ws.head =
+      element head {
+         ws.head.attlist,
+         db.title,
+         db.titleabbrev?,
+         db.subtitle?,
+         ws.summary?,
+         ws.keywords?,
+         ws.head.optional.components*
+      }
+}
+
+# ============================================================
+
+[
+   db:refname [ "meta" ]
+   db:refpurpose [ "The meta in a webpage head" ]
+]
+div {
+
+   ws.meta.role.attribute = attribute role { text }
+   ws.meta.http-equiv.attribute = attribute http-equiv { text }
+   ws.meta.name.attribute = attribute name { text }
+   ws.meta.content.attribute = attribute content { text }
+
+   ws.meta.attlist =
+      ws.meta.role.attribute?
+    & (ws.meta.http-equiv.attribute | ws.meta.name.attribute)
+    & ws.meta.content.attribute
+    & db.common.attributes
+
+   ws.meta =
+      element meta {
+         ws.meta.attlist,
+         empty
+      }
+}
+
+# ============================================================
+
+[
+   db:refname [ "link" ]
+   db:refpurpose [ "A link in the head of a webpage" ]
+]
+div {
+
+   ws.headlink.role.attribute = attribute role { text }
+
+   ws.headlink.href.attribute = attribute href { text }
+   ws.headlink.media.attribute = attribute media { text }
+   ws.headlink.name.attribute = attribute name { text }
+   ws.headlink.rel.attribute = attribute rel { text }
+   ws.headlink.rev.attribute = attribute rev { text }
+   ws.headlink.src.attribute = attribute src { text }
+   ws.headlink.title.attribute = attribute title { text }
+   ws.headlink.type.attribute = attribute type { text }
+
+   ws.headlink.attlist =
+      ws.headlink.role.attribute?
+    & ws.headlink.href.attribute?
+    & ws.headlink.media.attribute?
+    & ws.headlink.name.attribute?
+    & ws.headlink.rel.attribute?
+    & ws.headlink.rev.attribute?
+    & ws.headlink.src.attribute?
+    & ws.headlink.title.attribute?
+    & ws.headlink.type.attribute?
+    & db.common.attributes
+
+   ws.headlink =
+      element link {
+         ws.headlink.attlist,
+         empty
+      }
+}
+
+# ============================================================
+
+[
+   db:refname [ "script" ]
+   db:refpurpose [ "A script in the head of a webpage" ]
+]
+div {
+
+   ws.script.role.attribute = attribute role { text }
+
+   ws.script.src.attribute = attribute src { text }
+   ws.script.language.attribute = attribute language { text }
+   ws.script.type.attribute = attribute type { text }
+
+   ws.script.attlist =
+      ws.script.role.attribute?
+    & ws.script.language.attribute?
+    & ws.script.type.attribute?
+    & db.common.attributes
+
+   ws.script =
+      element script {
+         ws.script.attlist,
+         (ws.script.src.attribute | text)
+      }
+}
+
+# ============================================================
+
+[
+   db:refname [ "style" ]
+   db:refpurpose [ "A style section in the head of a webpage" ]
+]
+div {
+
+   ws.style.role.attribute = attribute role { text }
+
+   ws.style.src.attribute = attribute src { text }
+   ws.style.type.attribute = attribute type { text }
+
+   ws.style.attlist =
+      ws.style.role.attribute?
+    & ws.style.type.attribute?
+    & db.common.attributes
+
+   ws.style =
+      element style {
+         ws.style.attlist,
+         (ws.style.src.attribute | text)
+      }
+}
+
+# ============================================================
+
+[
+   db:refname [ "style" ]
+   db:refpurpose [ "A style section in the head of a webpage" ]
+]
+div {
+
+   ws.config.role.attribute = attribute role { text }
+
+   ws.config.param.attribute = attribute param { text }
+   ws.config.value.attribute = attribute value { text }
+   ws.config.altvalue.attribute = attribute altvalue { text }
+
+   ws.config.attlist =
+      ws.config.role.attribute?
+    & ws.config.param.attribute?
+    & ws.config.value.attribute?
+    & ws.config.altvalue.attribute?
+    & db.common.attributes
+
+   ws.config =
+      element config {
+         ws.config.attlist,
+         empty
+      }
+}
+
+# ============================================================
+
+[
+   db:refname [ "summary" ]
+   db:refpurpose [ "A short summary of a webpage" ]
+]
+div {
+
+   ws.summary.role.attribute = attribute role { text }
+
+   ws.summary.attlist =
+      ws.summary.role.attribute?
+    & db.common.attributes
+
+   ws.summary =
+      element summary {
+         ws.summary.attlist,
+         db.all.inlines*
+      }
+}
+
+# ============================================================
+
+[
+   db:refname [ "keywords" ]
+   db:refpurpose [ "The keywords for a webpage" ]
+]
+div {
+
+   ws.keywords.role.attribute = attribute role { text }
+
+   ws.keywords.attlist =
+      ws.keywords.role.attribute?
+    & db.common.attributes
+
+   ws.keywords =
+      element keywords {
+         ws.keywords.attlist,
+         text
+      }
+}
+
+# ============================================================
+
+[
+   db:refname [ "webtoc" ]
+   db:refpurpose [ "Marks the location of a TOC in a webpage" ]
+]
+div {
+
+   ws.webtoc.role.attribute = attribute role { text }
+
+   ws.webtoc.attlist =
+      ws.webtoc.role.attribute?
+    & db.common.attributes
+
+   ws.webtoc =
+      element webtoc {
+         ws.webtoc.attlist,
+         empty
+      }
+}
diff --git a/docbook/relaxng/website/src/website-full.rnc b/docbook/relaxng/website/src/website-full.rnc
new file mode 100644 (file)
index 0000000..778ffcf
--- /dev/null
@@ -0,0 +1,24 @@
+# This file is part of Website NG
+
+# This schema is a reinterpretation of "Website" in the NG framework.
+#
+# Author: Norman Walsh, <ndw@nwalsh.com>
+# Source: Derived from Website 2.6.0
+# Release: $Id$
+#
+# ======================================================================
+
+namespace ctrl = "http://nwalsh.com/xmlns/schema-control/"
+namespace rng  = "http://relaxng.org/ns/structure/1.0"
+namespace s = "http://www.ascc.net/xml/schematron"
+namespace db = "http://docbook.org/ns/docbook"
+default namespace = "http://docbook.org/ns/docbook"
+
+include "../../docbook/src/docbook.rnc" {
+   start = ws.webpage
+   db.all.blocks |= ws.webtoc
+}
+
+include "webpages.rnc"
+include "rddl.rnc"
+include "../../docbook/src/htmlform.rnc"
diff --git a/docbook/relaxng/website/src/website.rnc b/docbook/relaxng/website/src/website.rnc
new file mode 100644 (file)
index 0000000..3ee5a7d
--- /dev/null
@@ -0,0 +1,24 @@
+# This file is part of Website NG
+
+# This schema is a reinterpretation of "Website" in the NG framework.
+#
+# Author: Norman Walsh, <ndw@nwalsh.com>
+# Source: Derived from Website 2.6.0
+# Release: $Id$
+#
+# ======================================================================
+
+namespace ctrl = "http://nwalsh.com/xmlns/schema-control/"
+namespace rng  = "http://relaxng.org/ns/structure/1.0"
+namespace s = "http://www.ascc.net/xml/schematron"
+namespace db = "http://docbook.org/ns/docbook"
+default namespace = "http://docbook.org/ns/docbook"
+
+include "../../simple/src/sdocbook.rnc" {
+   start = ws.webpage
+   db.all.blocks |= ws.webtoc
+}
+
+include "webpages.rnc"
+include "rddl.rnc"
+include "../../docbook/src/htmlform.rnc"
diff --git a/docbook/relaxng/website/tests/example.xml b/docbook/relaxng/website/tests/example.xml
new file mode 100644 (file)
index 0000000..ba44112
--- /dev/null
@@ -0,0 +1,11 @@
+<webpage xmlns="http://docbook.org/ns/docbook"
+        xml:id="test1" xml:lang="de">
+<config param="rcsdate" value="$Date$"/>
+<head>
+<title>Test <emphasis>1</emphasis></title>
+<summary>Test 1 Page</summary>
+</head>
+<para>This is just a test page.</para>
+<webtoc/>
+
+</webpage>
diff --git a/docbook/relaxng/website/tests/form.xml b/docbook/relaxng/website/tests/form.xml
new file mode 100644 (file)
index 0000000..feb30cf
--- /dev/null
@@ -0,0 +1,22 @@
+<webpage xmlns="http://docbook.org/ns/docbook"
+        xml:id="test2" xmlns:html="http://www.w3.org/1999/xhtml">
+<config param="rcsdate" value="$Date$"/>
+<head>
+<title>Form Test</title>
+<summary>Form Test Page</summary>
+</head>
+<para>This is just a form test page.</para>
+<html:form action="javascript:alert('you did something');">
+<para>An input field: <html:input name="text"/>.</para>
+<para>A label: <html:label>label</html:label>.</para>
+<para>A button: <html:button><emphasis>This</emphasis> Button</html:button>.</para>
+<para>Selection: <html:select>
+<html:option>foo</html:option>
+<html:option selected="selected">bar</html:option>
+<html:option>baz</html:option>
+</html:select>.
+</para>
+<para><html:input type="submit" value="Do it!"/>.</para>
+</html:form>
+</webpage>
+