[patch] removal of chiuldElement attributes in dispspec files
Douglas Burke <[email protected]>
| Newsgroups | gmane.editors.conglomerate.devel |
|---|---|
| Message-ID | <Pine.GSO.4.58.0410131826320.10885@lagado> |
The attached patch changes occurrences of <header-info childElement="foo"></header-info> to <header-info xpath="normalize-space(child::foo)"/> in the dispspec file since the code does nothing with the childElement attribute. I've also changed the DTD to remove the childElement attribute. I added two header-info attributes to the docbook.xds; one for bridgehead and one for example. Doug
cong.diff.dispspec
(text/plain, 18.8 KB)
Index: dispspecs/ChangeLog =================================================================== RCS file: /cvs/gnome/conglomerate/dispspecs/ChangeLog,v retrieving revision 1.21 diff -u -r1.21 ChangeLog --- dispspecs/ChangeLog 9 Oct 2004 02:22:55 -0000 1.21 +++ dispspecs/ChangeLog 13 Oct 2004 22:25:50 -0000 @@ -1,3 +1,21 @@ +2004-10-13 Douglas Burke <[email protected]> + + * docbook.xds.in, opml.xds, release.xds, website-webpage.xds: + + Converted childElement attributes into xpath attributes for + header-info tags. Added header-info tags for the bridgehead and + example tags in docbook.xds.in. + + * validate-all-xds.sh: + + Now displays the name of each file it is processing to make it + easier to spot where the errors are. + + * xds.dtd: + + Removed the childElement attribute from the header-info tag + as it is not used by Conglomerate. + 2004-10-08 Douglas Burke <[email protected]> * docbook.xds.in: Index: dispspecs/docbook.xds.in =================================================================== RCS file: /cvs/gnome/conglomerate/dispspecs/docbook.xds.in,v retrieving revision 1.4 diff -u -r1.4 docbook.xds.in --- dispspecs/docbook.xds.in 9 Oct 2004 02:22:55 -0000 1.4 +++ dispspecs/docbook.xds.in 13 Oct 2004 22:25:50 -0000 @@ -26,13 +26,13 @@ <element localName="book" type="structural" color="a0b0c0" icon="cong-docbook-book"> <_name>Book</_name> <_short-desc>A book, with a title, and perhaps with some bibliographical material, in addition to the actual content of the book.</_short-desc> - <header-info childElement="title"></header-info> + <header-info xpath="normalize-space(child::title)"/> <property-dialog service-id="docbook-generic-node-properties"/> </element> <element localName="bookinfo" type="structural" color="a0b0c0" icon="cong-metadata"> <_name>Book Information</_name> <_short-desc>Meta-information for a book</_short-desc> - <header-info childElement="title"></header-info> + <header-info xpath="normalize-space(child::title)"/> <property-dialog service-id="docbook-generic-node-properties"/> </element> @@ -43,7 +43,7 @@ <element localName="articleinfo" type="structural" color="a0b0c0" icon="cong-metadata"> <_name>Article Information</_name> <_short-desc>Meta-information for an article</_short-desc> - <header-info childElement="title"></header-info> + <header-info xpath="normalize-space(child::title)"/> <property-dialog service-id="docbook-generic-node-properties"/> </element> @@ -146,7 +146,7 @@ </element> <element localName="formalpara" type = "structural" icon="cong-paragraph"> <_name>Paragraph (titled)</_name> - <header-info childElement="title"></header-info> + <header-info xpath="normalize-space(child::title)"/> <property-dialog service-id="docbook-generic-node-properties"/> </element> <element localName="legalnotice" type="structural" color="a0b0c0" icon="cong-metadata"> @@ -160,13 +160,13 @@ <element localName="qandaset" type="structural" color="a0b0c0" icon="cong-faq"> <_name>Question-and-Answer Set</_name> - <header-info childElement="title"></header-info> + <header-info xpath="normalize-space(child::title)"/> <property-dialog service-id="docbook-generic-node-properties"/> </element> <element localName="qandadiv" type="structural" color="a0b0c0" icon="cong-wrapper"> <_name>Question-and-Answer Subset</_name> - <header-info childElement="title"></header-info> + <header-info xpath="normalize-space(child::title)"/> <property-dialog service-id="docbook-generic-node-properties"/> </element> @@ -192,7 +192,7 @@ <element localName="biblioentry" type="structural" color="a0b0c0" icon="cong-entry"> <_name>Entry</_name> - <header-info childElement="title"></header-info> + <header-info xpath="normalize-space(child::title)"/> <property-dialog service-id="docbook-generic-node-properties"/> </element> @@ -203,6 +203,7 @@ <element localName="bridgehead" type="structural" color="a0b0c0" icon="cong-title"> <_name>Free-floating Heading</_name> + <header-info xpath="normalize-space(.)"/> <property-dialog service-id="docbook-generic-node-properties"/> </element> @@ -214,13 +215,13 @@ <!-- The various sections --> <element localName="preface" type="structural" color="a0b0c0" icon="cong-subsection"> <_name>Preface</_name> - <header-info childElement="title"></header-info> + <header-info xpath="normalize-space(child::title)"/> <property-dialog service-id="docbook-generic-node-properties"/> </element> <element localName="part" type="structural" color="a0b0c0" icon="cong-subsection"> <_name>Part</_name> <_short-desc>A high-level division of a book.</_short-desc> - <header-info childElement="title"></header-info> + <header-info xpath="normalize-space(child::title)"/> <property-dialog service-id="docbook-generic-node-properties"/> </element> @@ -231,46 +232,46 @@ <element localName="chapter" type="structural" color="a0b0c0" icon="cong-subsection"> <_name>Chapter</_name> - <header-info childElement="title"></header-info> + <header-info xpath="normalize-space(child::title)"/> <property-dialog service-id="docbook-generic-node-properties"/> </element> <element localName="sect1" type="structural" color="a1b0c0" icon="cong-subsection"> <_name>Section</_name> <_short-desc>A top-level section of document</_short-desc> - <header-info childElement="title"></header-info> + <header-info xpath="normalize-space(child::title)"/> <property-dialog service-id="docbook-generic-node-properties"/> </element> <element localName="sect2" type="structural" color="a0b0c0" icon="cong-subsection"> <_name>Subsection</_name> <_short-desc>A subsection within a section</_short-desc> - <header-info childElement="title"></header-info> + <header-info xpath="normalize-space(child::title)"/> <property-dialog service-id="docbook-generic-node-properties"/> </element> <element localName="sect3" type="structural" color="a0b0c0" icon="cong-subsection"> <_name>Subsection (level 3)</_name> - <header-info childElement="title"></header-info> + <header-info xpath="normalize-space(child::title)"/> <property-dialog service-id="docbook-generic-node-properties"/> </element> <element localName="sect4" type="structural" color="a0b0c0" icon="cong-subsection"> <_name>Subsection (level 4)</_name> - <header-info childElement="title"></header-info> + <header-info xpath="normalize-space(child::title)"/> <property-dialog service-id="docbook-generic-node-properties"/> </element> <element localName="sect5" type="structural" color="a0b0c0" icon="cong-subsection"> <_name>Section (level 5)</_name> - <header-info childElement="title"></header-info> + <header-info xpath="normalize-space(child::title)"/> <property-dialog service-id="docbook-generic-node-properties"/> </element> <element localName="section" type="structural" color="a0b0c0" icon="cong-subsection"> <_name>Section</_name> - <header-info childElement="title"></header-info> + <header-info xpath="normalize-space(child::title)"/> <property-dialog service-id="docbook-generic-node-properties"/> </element> <element localName="reference" type="structural" color="a0b0c0" icon="cong-subsection"> <_name>Reference</_name> - <header-info childElement="title"></header-info> + <header-info xpath="normalize-space(child::title)"/> <property-dialog service-id="docbook-generic-node-properties"/> </element> @@ -325,25 +326,25 @@ <element localName="refsect1" type="structural" color="a0b0c0" icon="cong-subsection"> <_name>Section</_name> - <header-info childElement="title"></header-info> + <header-info xpath="normalize-space(child::title)"/> <property-dialog service-id="docbook-generic-node-properties"/> </element> <element localName="refsect2" type="structural" color="a0b0c0" icon="cong-subsection"> <_name>Subsection</_name> - <header-info childElement="title"></header-info> + <header-info xpath="normalize-space(child::title)"/> <property-dialog service-id="docbook-generic-node-properties"/> </element> <element localName="refsect3" type="structural" color="a0b0c0" icon="cong-subsection"> <_name>Subsubsection</_name> - <header-info childElement="title"></header-info> + <header-info xpath="normalize-space(child::title)"/> <property-dialog service-id="docbook-generic-node-properties"/> </element> <element localName="appendix" type="structural" color="a0b0c0" icon="cong-subsection"> <_name>Appendix</_name> - <header-info childElement="title"></header-info> + <header-info xpath="normalize-space(child::title)"/> <property-dialog service-id="docbook-generic-node-properties"/> </element> @@ -354,7 +355,7 @@ <element localName="glossentry" type="structural" color="a0b0c0" icon="cong-entry"> <_name>Glossary Entry</_name> - <header-info childElement="glossterm"></header-info> + <header-info xpath="normalize-space(child::glossterm)"/> <property-dialog service-id="docbook-generic-node-properties"/> </element> @@ -371,6 +372,7 @@ <element localName="example" type="structural" color="a0b0c0"> <_name>Example (formal)</_name> + <header-info xpath="normalize-space(child::title)"/> <property-dialog service-id="docbook-generic-node-properties"/> </element> @@ -576,13 +578,13 @@ <element localName="procedure" type="structural" color="a0b0c0"> <_name>Procedure</_name> - <header-info childElement="title"></header-info> + <header-info xpath="normalize-space(child::title)"/> <property-dialog service-id="docbook-generic-node-properties"/> </element> <element localName="step" type="structural" color="a0b0c0"> <_name>Step</_name> - <header-info childElement="title"></header-info> + <header-info xpath="normalize-space(child::title)"/> <property-dialog service-id="docbook-generic-node-properties"/> </element> Index: dispspecs/opml.xds =================================================================== RCS file: /cvs/gnome/conglomerate/dispspecs/opml.xds,v retrieving revision 1.3 diff -u -r1.3 opml.xds --- dispspecs/opml.xds 8 Jun 2004 15:48:21 -0000 1.3 +++ dispspecs/opml.xds 13 Oct 2004 22:25:50 -0000 @@ -16,7 +16,7 @@ </element> <element localName="head" type="structural" color="a0b0c0"> <name xml:lang="C">Head</name> - <header-info childElement="title"/> + <header-info xpath="normalize-space(child::title)"/> </element> <element localName="title" type="span" color="a0b0c0"> <name xml:lang="C">Title</name> Index: dispspecs/release.xds =================================================================== RCS file: /cvs/gnome/conglomerate/dispspecs/release.xds,v retrieving revision 1.3 diff -u -r1.3 release.xds --- dispspecs/release.xds 14 Jun 2004 03:27:11 -0000 1.3 +++ dispspecs/release.xds 13 Oct 2004 22:25:50 -0000 @@ -1,5 +1,5 @@ <?xml version="1.0"?> -<!DOCTYPE dispspec SYSTEM "dispspec.dtd"> +<!DOCTYPE dispspec SYSTEM "xds.dtd"> <dispspec> <metadata> <name>Conglomerate Release Notes</name> @@ -8,7 +8,7 @@ <element-list> <element type="structural" localName="release" whitespace="normalize"> <name xml:lang="C">Release</name> - <header-info childElement="title"/> + <header-info xpath="normalize-space(child::title)"/> </element> <element type="structural" localName="title" whitespace="normalize"> <name xml:lang="C">Title</name> Index: dispspecs/validate-all-xds.sh =================================================================== RCS file: /cvs/gnome/conglomerate/dispspecs/validate-all-xds.sh,v retrieving revision 1.1 diff -u -r1.1 validate-all-xds.sh --- dispspecs/validate-all-xds.sh 9 Feb 2004 18:56:12 -0000 1.1 +++ dispspecs/validate-all-xds.sh 13 Oct 2004 22:25:50 -0000 @@ -1,6 +1,8 @@ #!/bin/bash # Run xmllint on all xds files in this directory for x in *.xds; - do (xmllint --noout --dtdvalid xds.dtd $x); + do + echo "Checking: $x"; + (xmllint --noout --dtdvalid xds.dtd $x); done Index: dispspecs/website-webpage.xds =================================================================== RCS file: /cvs/gnome/conglomerate/dispspecs/website-webpage.xds,v retrieving revision 1.1 diff -u -r1.1 website-webpage.xds --- dispspecs/website-webpage.xds 9 Feb 2004 18:56:12 -0000 1.1 +++ dispspecs/website-webpage.xds 13 Oct 2004 22:25:50 -0000 @@ -15,7 +15,7 @@ <!-- The high-level divisions --> <element localName="webpage" type="structural" color="a0b0c0"> <name xml:lang="en">Web Page</name> - <header-info childElement="title"></header-info> + <header-info xpath="normalize-space(child::title)"/> </element> <element localName="title" type="structural" color="a0b0c0"> @@ -87,11 +87,11 @@ </element> <element localName="qandaset" type="structural" color="a0b0c0"> - <header-info childElement="title"></header-info> + <header-info xpath="normalize-space(child::title)"/> </element> <element localName="qandadiv" type="structural" color="a0b0c0"> - <header-info childElement="title"></header-info> + <header-info xpath="normalize-space(child::title)"/> </element> <element localName="qandaentry" type="structural" color="a0b0c0"> @@ -109,7 +109,7 @@ <element localName="biblioentry" type="structural" color="a0b0c0"> <name xml:lang="en">Entry</name> - <header-info childElement="title"></header-info> + <header-info xpath="normalize-space(child::title)"/> </element> <element localName="bibliodiv" type="structural" color="a0b0c0"> @@ -123,11 +123,11 @@ <!-- The various sections --> <element localName="preface" type="structural" color="a0b0c0"> <name xml:lang="en">Preface</name> - <header-info childElement="title"></header-info> + <header-info xpath="normalize-space(child::title)"/> </element> <element localName="part" type="structural" color="a0b0c0"> <name xml:lang="en">Part</name> - <header-info childElement="title"></header-info> + <header-info xpath="normalize-space(child::title)"/> </element> <element localName="partintro" type="structural" color="a0b0c0"> @@ -136,39 +136,39 @@ <element localName="chapter" type="structural" color="a0b0c0"> <name xml:lang="en">Chapter</name> - <header-info childElement="title"></header-info> + <header-info xpath="normalize-space(child::title)"/> </element> <element localName="sect1" type="structural" color="a1b0c0"> <name xml:lang="en">Section</name> <short-desc xml:lang="en">A top-level section of document</short-desc> - <header-info childElement="title"></header-info> + <header-info xpath="normalize-space(child::title)"/> </element> <element localName="sect2" type="structural" color="a0b0c0"> <name xml:lang="en">Subsection</name> <short-desc xml:lang="en">A subsection within a section</short-desc> - <header-info childElement="title"></header-info> + <header-info xpath="normalize-space(child::title)"/> </element> <element localName="sect3" type="structural" color="a0b0c0"> <name xml:lang="en">Subsection (level 3)</name> - <header-info childElement="title"></header-info> + <header-info xpath="normalize-space(child::title)"/> </element> <element localName="sect4" type="structural" color="a0b0c0"> <name xml:lang="en">Subsection (level 4)</name> - <header-info childElement="title"></header-info> + <header-info xpath="normalize-space(child::title)"/> </element> <element localName="sect5" type="structural" color="a0b0c0"> <name xml:lang="en">Section (level 5)</name> - <header-info childElement="title"></header-info> + <header-info xpath="normalize-space(child::title)"/> </element> <element localName="reference" type="structural" color="a0b0c0"> <name xml:lang="en">Reference</name> - <header-info childElement="title"></header-info> + <header-info xpath="normalize-space(child::title)"/> </element> <element localName="refentry" type="structural" color="a0b0c0"> <name xml:lang="en">Reference Page</name> - <header-info childElement="refname"></header-info> + <header-info xpath="normalize-space(child::refname)"/> </element> <element localName="refmeta" type="structural" color="a0b0c0"> @@ -208,22 +208,22 @@ <element localName="refsect1" type="structural" color="a0b0c0"> <name xml:lang="en">Section</name> - <header-info childElement="title"></header-info> + <header-info xpath="normalize-space(child::title)"/> </element> <element localName="refsect2" type="structural" color="a0b0c0"> <name xml:lang="en">Subsection</name> - <header-info childElement="title"></header-info> + <header-info xpath="normalize-space(child::title)"/> </element> <element localName="refsect3" type="structural" color="a0b0c0"> <name xml:lang="en">Subsubsection</name> - <header-info childElement="title"></header-info> + <header-info xpath="normalize-space(child::title)"/> </element> <element localName="appendix" type="structural" color="a0b0c0"> <name xml:lang="en">Appendix</name> - <header-info childElement="title"></header-info> + <header-info xpath="normalize-space(child::title)"/> </element> <element localName="glossary" type="structural" color="a0b0c0"> @@ -232,7 +232,7 @@ <element localName="glossentry" type="structural" color="a0b0c0"> <name xml:lang="en">Glossary Entry</name> - <header-info childElement="glossterm"></header-info> + <header-info xpath="normalize-space(child::glossterm)"/> </element> <element localName="glossterm" type="structural" color="a0b0c0"> @@ -337,12 +337,12 @@ <element localName="procedure" type="structural" color="a0b0c0"> <name xml:lang="en">Procedure</name> - <header-info childElement="title"></header-info> + <header-info xpath="normalize-space(child::title)"/> </element> <element localName="step" type="structural" color="a0b0c0"> <name xml:lang="en">Step</name> - <header-info childElement="title"></header-info> + <header-info xpath="normalize-space(child::title)"/> </element> <element localName="substeps" type="structural" color="a0b0c0"> Index: dispspecs/xds.dtd =================================================================== RCS file: /cvs/gnome/conglomerate/dispspecs/xds.dtd,v retrieving revision 1.5 diff -u -r1.5 xds.dtd --- dispspecs/xds.dtd 18 Jul 2004 21:04:31 -0000 1.5 +++ dispspecs/xds.dtd 13 Oct 2004 22:25:50 -0000 @@ -109,7 +109,6 @@ <!ELEMENT header-info EMPTY > <!ATTLIST header-info - childElement IDREF #IMPLIED xpath CDATA #IMPLIED >