OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] Re: xinclude


Certainly. Running trang on the DTD I posted above results in a
compact grammar that follows at the end of this email. If I change the
overall DTD (dbmathmlxi.dtd, posted earlier in this thread) to point
to the 4.5CR1 DTD, trang still completes, but the generated
dbmathml.rnc file looks like this:

mathml-math = mml.math
equation.content = alt?, (graphic | mediaobject | mathml-math)+
inlineequation.content =
  alt?, (graphic | inlinemediaobject | mathml-math)+
local.chapter.class = xi.include
local.divcomponent.mix = xi.include
local.para.char.mix = xi.include
local.info.class = xi.include
local.component.mix = xi.include
include "docbookx.rnc"
NamespaceDecl.attrib = empty
include "mathml2.rnc"
include "xinclude.rnc"
start = mathphrase
any =
  (element * {
     attribute * { text }*,
     any
   }
   | text)*

Compare that with referencing V4.3:

mathml-math = mml.math
equation.content = alt?, (graphic | mediaobject | mathml-math)+
inlineequation.content =
  alt?, (graphic | inlinemediaobject | mathml-math)+
local.chapter.class = xi.include
local.divcomponent.mix = xi.include
local.para.char.mix = xi.include
local.info.class = xi.include
local.component.mix = xi.include
include "docbookx.rnc"
NamespaceDecl.attrib = empty
include "mathml2.rnc"
include "xinclude.rnc"
start =
  mml.vector
  | mml.vectorproduct
  | informalequation
  | userinput
  | methodname
  | mml.ceiling
  | mml.munderover
  | alt
  | mml.ms
  | mml.max
  | primary
  | mml.mo
  | mml.mn
  | mml.mi
  | reference
  | mml.forall
  | subjectterm
  | biblioset
  | colophon
  | mml.malignmark
  | mml.lt
  | ackno
  | mousebutton
  | glosslist
  | glossaryinfo
  | bibliorelation
  | mml.ln
  | classsynopsisinfo
  | mml.mroot
  | secondary
  | code
  | mml.approx
  | firstname
  | mml.interval
  | refsect3info
  | guimenu
  | ooexception
  | example
  | mml.mspace
  | lot
  | mml.arccsch
  | shortcut
  | toc
  | returnvalue
  | beginpage
  | mml.card
  | dedication
  | refname
  | tfoot
  | highlights
  | date
  | shortaffil
  | manvolnum
  | mml.mover
  | glossdef
  | term
  | chapterinfo
  | collabname
  | sect2info
  | bibliocoverage
  | mml.naturalnumbers
  | mml.inverse
  | mml.in
  | programlisting
  | mml.arctan
  | mml.logbase
  | paramdef
  | fax
  | mml.sin
  | mml.csch
  | caution
  | orderedlist
  | mml.outerproduct
  | mml.not
  | lineannotation
  | bibliomisc
  | destructorsynopsis
  | spanspec
  | mml.mglyph
  | \token
  | mml.lambda
  | mml.moment
  | bibliomset
  | bibliosource
  | isbn
  | affiliation
  | initializer
  | audioobject
  | mml.lowlimit
  | mml.gt
  | mediaobject
  | varname
  | qandaset
  | mml.grad
  | mml.eulergamma
  | calloutlist
  | revision
  | refentryinfo
  | corpname
  | anchor
  | graphicco
  | revhistory
  | areaspec
  | mml.fn
  | mml.emptyset
  | holder
  | setindex
  | personblurb
  | literal
  | sect5info
  | refdescriptor
  | mml.product
  | mml.eq
  | mml.transpose
  | invpartnumber
  | objectinfo
  | imageobjectco
  | mml.arctanh
  | mml.set
  | tip
  | mml.sep
  | keycombo
  | mml.sec
  | refmiscinfo
  | indexdiv
  | mml.arg
  | void
  | tertiaryie
  | section
  | abbrev
  | substeps
  | subject
  | literallayout
  | mml.minus
  | part
  | partintro
  | mml.tanh
  | mml.cn
  | xi.include
  | mml.matrix
  | mml.ci
  | revdescription
  | accel
  | mml.mstyle
  | mml.arccoth
  | book
  | mml.divide
  | para
  | informaltable
  | citebiblioid
  | indexterm
  | note
  | application
  | itemizedlist
  | mml.root
  | partinfo
  | refsynopsisdiv
  | mml.arccosh
  | mml.notprsubset
  | mml.notsubset
  | keycap
  | articleinfo
  | entry
  | contractnum
  | blockquote
  | mml.degree
  | mml.int
  | mml.primes
  | mml.coth
  | callout
  | funcparams
  | synopfragment
  | mml.false
  | mml.and
  | imageobject
  | confnum
  | mml.cosh
  | segmentedlist
  | errortext
  | mml.union
  | ooclass
  | mml.piece
  | orgname
  | glossterm
  | artpagenums
  | mml.mtext
  | msgentry
  | msgrel
  | issuenum
  | mml.arcsech
  | row
  | emphasis
  | msgmain
  | mml.neq
  | bookinfo
  | caption
  | contrib
  | mml.msqrt
  | mml.codomain
  | indexinfo
  | biblioid
  | table
  | inlinegraphic
  | bibliodiv
  | mml.mpadded
  | refsect1info
  | fieldsynopsis
  | symbol
  | colspec
  | mml.sech
  | videodata
  | question
  | mml.merror
  | mml.mfrac
  | mml.domainofapplication
  | pagenums
  | envar
  | acronym
  | command
  | step
  | msgsub
  | mml.list
  | msg
  | funcsynopsisinfo
  | confgroup
  | mml.log
  | releaseinfo
  | authorinitials
  | mml.imaginaryi
  | uri
  | errorcode
  | refclass
  | tocfront
  | keycode
  | year
  | secondaryie
  | mml.arccsc
  | mml.exists
  | othercredit
  | setindexinfo
  | prefaceinfo
  | tertiary
  | mml.mrow
  | constant
  | refentry
  | mml.mlabeledtr
  | mml.annotation
  | revremark
  | group
  | pubdate
  | screeninfo
  | revnumber
  | confdates
  | wordasword
  | mml.determinant
  | hardware
  | toclevel5
  | toclevel4
  | toclevel3
  | toclevel2
  | toclevel1
  | property
  | mml.true
  | markup
  | answer
  | bibliography
  | tocentry
  | mml.mfenced
  | sidebarinfo
  | appendix
  | sect3info
  | screenco
  | qandadiv
  | mml.arccot
  | mml.arccos
  | menuchoice
  | citerefentry
  | copyright
  | refnamediv
  | oointerface
  | titleabbrev
  | medialabel
  | city
  | funcsynopsis
  | bridgehead
  | errorname
  | filename
  | mml.matrixrow
  | volumenum
  | bibliographyinfo
  | printhistory
  | variablelist
  | otheraddr
  | mml.declare
  | msglevel
  | mml.divergence
  | chapter
  | tocpart
  | mml.abs
  | phrase
  | mml.mode
  | mml.piecewise
  | imagedata
  | subjectset
  | seeie
  | bibliomixed
  | tocback
  | mml.power
  | option
  | lineage
  | mml.imaginary
  | mml.curl
  | listitem
  | citetitle
  | mml.setdiff
  | seriesvolnums
  | mml.exp
  | mml.arcsin
  | mml.leq
  | mml.reln
  | mml.selector
  | task
  | taskrelated
  | pob
  | mml.arcsinh
  | tr
  | sect5
  | sect4
  | sect3
  | xref
  | sect2
  | sect1
  | mml.image
  | th
  | publishername
  | simplemsgentry
  | td
  | guilabel
  | mml.ident
  | label
  | mml.uplimit
  | mml.equivalent
  | structname
  | corpcredit
  | mml.lcm
  | type
  | refentrytitle
  | inlinemediaobject
  | mml.notin
  | mml.sinh
  | surname
  | mml.condition
  | sgmltag
  | olink
  | mml.menclose
  | msgaud
  | mml.maligngroup
  | mml.mtr
  | edition
  | mml.mmultiscripts
  | mml.tan
  | mml.infinity
  | referenceinfo
  | itermset
  | lotentry
  | msgtext
  | mml.mtd
  | mml.conjugate
  | mml.arcsec
  | funcprototype
  | trademark
  | function
  | mml.msup
  | coref
  | modespec
  | action
  | abstract
  | mml.msub
  | mml.bvar
  | mml.times
  | msgexplan
  | mml.munder
  | remark
  | mml.factorial
  | msgset
  | exceptionname
  | seglistitem
  | indexentry
  | state
  | glossary
  | tgroup
  | mml.variance
  | sidebar
  | mml.subset
  | glosssee
  | mml.geq
  | xi.fallback
  | refsect2info
  | refsection
  | col
  | replaceable
  | superscript
  | pubsnumber
  | seealso
  | mml.notanumber
  | mml.tendsto
  | mml.exponentiale
  | simpara
  | formalpara
  | author
  | mml.limit
  | refsect3
  | refsect2
  | refsect1
  | mml.mtable
  | sect1info
  | mediaobjectco
  | mml.prsubset
  | authorblurb
  | mml.otherwise
  | glossentry
  | mml.gcd
  | sectioninfo
  | conftitle
  | email
  | footnoteref
  | keysym
  | contractsponsor
  | subtitle
  | preface
  | equation
  | screen
  | textobject
  | corpauthor
  | primaryie
  | informalfigure
  | modifier
  | authorgroup
  | systemitem
  | ulink
  | parameter
  | programlistingco
  | structfield
  | tocchap
  | appendixinfo
  | guibutton
  | guisubmenu
  | publisher
  | mml.intersect
  | database
  | issn
  | methodsynopsis
  | mml.real
  | synopfragmentref
  | title
  | subscript
  | quote
  | optional
  | orgdiv
  | sect4info
  | collab
  | productnumber
  | epigraph
  | synopsis
  | simplesect
  | mml.rem
  | mml.plus
  | thead
  | warning
  | country
  | entrytbl
  | mml.compose
  | setinfo
  | mml.partialdiff
  | refsectioninfo
  | mml.mean
  | mml.momentabout
  | varlistentry
  | mml.annotation-xml
  | street
  | mml.integers
  | simplelist
  | refmeta
  | productname
  | mml.mprescripts
  | mml.msubsup
  | colgroup
  | mml.laplacian
  | prompt
  | mml.xor
  | legalnotice
  | biblioentry
  | classsynopsis
  | mml.quotient
  | segtitle
  | msgorig
  | mml.rationals
  | mml.min
  | phone
  | stepalternatives
  | msginfo
  | mml.sum
  | attribution
  | member
  | methodparam
  | honorific
  | mml.mphantom
  | mml.maction
  | cmdsynopsis
  | set
  | funcdef
  | footnote
  | procedure
  | seg
  | see
  | mml.semantics
  | guimenuitem
  | refsynopsisdivinfo
  | othername
  | mml.diff
  | audiodata
  | glossseealso
  | arg
  | mml.csymbol
  | mml.none
  | tasksummary
  | videoobject
  | blockinfo
  | informalexample
  | varargs
  | screenshot
  | mml.implies
  | keywordset
  | mml.sdev
  | qandaentry
  | guiicon
  | co
  | link
  | confsponsor
  | mml.csc
  | tbody
  | citation
  | personname
  | interfacename
  | textdata
  | important
  | mml.scalarproduct
  | errortype
  | graphic
  | mml.domain
  | keyword
  | sbr
  | interface
  | mml.math
  | mml.reals
  | mml.complexes
  | mml.pi
  | address
  | jobtitle
  | area
  | index
  | editor
  | classname
  | taskprerequisites
  | mml.or
  | postcode
  | constructorsynopsis
  | mml.median
  | seealsoie
  | article
  | figure
  | mml.floor
  | computeroutput
  | foreignphrase
  | firstterm
  | areaset
  | mml.cartesianproduct
  | mml.factorof
  | inlineequation
  | glossdiv
  | refpurpose
  | mml.apply
  | mml.cot
  | mml.cos
any =
  (element * {
     attribute * { text }*,
     any
   }
   | text)*

Maybe trang is just broken?

On 3/6/06, Bob Stayton <bobs@sagehill.net> wrote:
> Hi Chris,
> Can you describe in more detail what "didn't work" with 4.5?
>
> Bob Stayton
> Sagehill Enterprises
> DocBook Consulting
> bobs@sagehill.net
>
>
> ----- Original Message -----
> From: "Chris Chiasson" <chris@chiasson.name>
> To: "docbook-apps List" <docbook-apps@lists.oasis-open.org>
> Sent: Friday, March 03, 2006 1:07 PM
> Subject: [docbook-apps] Re: xinclude
>
>
> BTW, the (overall) DTD I came up with didn't work when referencing the
> Docbook 4.5CR1 DTD. It only worked when referencing the Docbook 4.3
> DTD. I wonder why that is?
>
> Here is the text of the DTD:
>
> <!ENTITY % mathml-colon               ':'>
> <!ENTITY % mathml-prefix              'mml'>
> <!ENTITY % mathml-math                '%mathml-prefix;%mathml-colon;math' >
> <!ENTITY % equation.content "(alt?, (graphic|mediaobject|%mathml-math;)+)">
> <!ENTITY % inlineequation.content "(alt?,
> (graphic|inlinemediaobject|%mathml-math;)+)">
>
> <!ENTITY % local.chapter.class "| xi:include">
> <!ENTITY % local.divcomponent.mix "| xi:include">
> <!ENTITY % local.para.char.mix "| xi:include">
> <!ENTITY % local.info.class "| xi:include">
> <!ENTITY % local.component.mix "| xi:include">
>
> <!ENTITY % docbook PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
>                    "../../xml-dtd-4.3/docbookx.dtd">
> %docbook;
>
> <!ENTITY % NS.prefixed     "INCLUDE">
> <!ENTITY % MATHML.prefix   "%mathml-prefix;">
> <!ENTITY % NamespaceDecl.attrib "
> xmlns%mathml-colon;%mathml-prefix;
> CDATA #FIXED 'http://www.w3.org/1998/Math/MathML'">
>
> <!ENTITY % mathml PUBLIC "-//W3C//DTD MathML 2.0//EN"
>                   "../../../common/dtd/mathml2/mathml2.dtd">
> %mathml;
>
> <!ENTITY % xinclude PUBLIC "-//UBS//CORE//DTD XInclude V1.0//EN"
>                     "../../../xinclude/xinclude.dtd">
> %xinclude;
>
>
> On 3/3/06, Chris Chiasson <chris@chiasson.name> wrote:
> > Hello docbook-apps,
> >
> > In trying to find an editor that would let me work on the
> > W3C-Schema-defined DotML format for drawing graphs with graphviz, I
> > decided to move away from XXE because its' free version doesn't
> > support XSD or RNG schemata if the document isn't one of a limited set
> > of XML formats. It also doesn't properly support xi:include elements
> > with the attribute parse="text".
> >
> > I tried <oxygen/>, but found it slow, resource hungry, and confusing.
> > It once took upwards of five minutes to tell me I had ~20 xi:include
> > elements that were invalid. At least that's what I thought happened. I
> > haven't yet been back to it since trying emacs nxml mode. If you are
> > wondering, I did enable xi:include processing in <oxygen/>.
> >
> > nXML... where to begin? It really assaults the (ok, my) mind to try to
> > assimilate a new schema XML format, a compact version thereof, and a
> > different philosophy about how (or even whether) a document is
> > associated with a schema.
> >
> > An effective conversion to docbookxi 5+mathml schema and format, along
> > with proper stylesheet processing is still out of my reach... so, in
> > the meantime, I'm still with to db4+mathml.
> >
> > At first, nXML was invalidating my xi:includes. I realized this is
> > because they are not in the included Docbook 4.2 grammar. I tried
> > adding xi:include and mml:math elements to the Docbook 4.5CR1 grammar
> > by paralleling the method given in the docbook 5 howto at
> >
> > http://www.docbook.org/docs/howto/#faq-customization-mathml-svg
> >
> > , where the example there is db5+mathml+svg. I didn't know how to
> > create a compact grammar for xincludes, so I found a DTD in the
> > mailing list archives,
> >
> > http://lists.oasis-open.org/archives/docbook-apps/200210/msg00018.html
> >
> > , and converted it with trang. Paralleling the howto did not work out for
> me.
> >
> > Since I had trang and the XInclude DTD of the archived message, I
> > decided to modify the Docbook 4.3 + MathML DTD from
> >
> > http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd
> >
> > and then convert it to a grammar. I had to modify the MathML DTD to
> > support XIncludes instead of adding the XInclude DTD via entity
> > reference to my documents, because nXML mode does not obey entity
> > references.
> >
> > Since I don't know much about DTDs, this process was fun... heh... No
> > matter where I referenced the XInclude DTD inside the DB+MathML DTD,
> > nXML mode was still not validating properly.
> >
> > Finally, as with many of my Docbook problems, I found an answer in the
> > place I should have looked first, Bob Stayton's Docbook XSL: The
> > Complete Guide at
> >
> > http://www.sagehill.net/docbookxsl/ValidXinclude.html
> >
> > . It says to append the xi:include element to the content models of
> > some other elements... this makes sense. I eventually figured out that
> > the content model modifications had to come before the main Docbook
> > DTD reference, which in turn had to come before the main XInclude DTD
> > reference in the (overall) DTD. (I don't know about the relative
> > positioning of the XInclude and MathML DTDs and entity references - my
> > .mml files and the .xml files that reference them are automatically
> > created by my Mathematica script, so I don't edit those files in
> > nXML.)
> >
> > The (overall) DTD now looks like:
> >
> > 1. docbook mml entity mods
> >
> > 2. docbook xi entity mods (from
> > http://www.sagehill.net/docbookxsl/ValidXinclude.html, plus others)
> >
> > 3. docbook dtd reference
> >
> > 4. mathml dtd reference
> >
> > 5. xinclude dtd reference (from
> > http://lists.oasis-open.org/archives/docbook-apps/200210/msg00018.html)
> >
> > I converted this DTD into a grammar and then loaded into nXML. As it
> > turned out, this didn't fix all my problems. Notice that the XInclude
> > DTD from msg00018.html above is missing the question mark from
> > (xi:fallback?). This made nXML mode tell me that an xi:include
> > couldn't be empty. I figured this question mark problem out for myself
> > by reading some DTD tutorials... Then I found the answer, again, in
> > the eample from Bob Stayton's book. I know... Not too bright am I...
> >
> > So, that took care of allowing empty xi:includes. Unfortunately, nXML
> > mode didn't like my xpointer attributes. The third time being the
> > charm, started with Bob Stayton's DTD... his DTD was also missing the
> > xpointer attribute. ?!?!? Eventually, I just made one up. This last
> > bit caused my documents to validate. Yay!
> >
> > Now. On to DotML.
> >
> > P.S. I just found a good XInclude DTD at
> > http://www.w3.org/TR/xinclude/#include_element
> > P.P.S. I bet using rngconv on the XInclude XSD at the w3c page above
> > would generate a really good Relax NG grammar.
> >
> > Ciao,
> > --
> > http://chris.chiasson.name/
> >
>
>
> --
> http://chris.chiasson.name/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
>
>
>
>
>


--
http://chris.chiasson.name/


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]