<!-- doc:docprop.author mode is for creating document metadata -->
- <xsl:template match='author|editor' mode='doc:docprop.author'>
- <xsl:apply-templates select='firstname|personname/firstname' mode='doc:docprop.author'/>
+ <xsl:template match='author|doc:author|editor|doc:editor' mode='doc:docprop.author'>
+ <xsl:apply-templates select='firstname|doc:firstname |
+ personname/firstname|doc:personname/doc:firstname'
+ mode='doc:docprop.author'/>
<xsl:text> </xsl:text>
- <xsl:apply-templates select='surname|personname/surname' mode='doc:docprop.author'/>
+ <xsl:apply-templates select='surname|doc:surname |
+ personname/surname|doc:personname/doc:surname'
+ mode='doc:docprop.author'/>
</xsl:template>
- <xsl:template match='authorinitials' mode='doc:docprop.author'>
+ <xsl:template match='authorinitials|doc:authorinitials'
+ mode='doc:docprop.author'>
<xsl:value-of select='.'/>
</xsl:template>
<!-- doc:body mode is for processing components of a document -->
- <xsl:template match='book|article|chapter|section|sect1|sect2|sect3|sect4|sect5|simplesect' mode='doc:body'>
+ <xsl:template match='book|article|chapter|section|sect1|sect2|sect3|sect4|sect5|simplesect |
+ doc:book|doc:article|doc:chapter|doc:section|doc:sect1|doc:sect2|doc:sect3|doc:sect4|doc:sect5|doc:simplesect'
+ mode='doc:body'>
<xsl:call-template name='doc:make-subsection'/>
</xsl:template>
<xsl:template match='articleinfo |
chapterinfo |
- bookinfo' mode='doc:body'>
- <xsl:apply-templates select='title|subtitle|titleabbrev' mode='doc:body'/>
- <xsl:apply-templates select='author|releaseinfo' mode='doc:body'/>
+ bookinfo |
+ doc:articleinfo |
+ doc:chapterinfo |
+ doc:bookinfo'
+ mode='doc:body'>
+ <xsl:apply-templates select='title|subtitle|titleabbrev |
+ doc:title|doc:subtitle|doc:titleabbrev'
+ mode='doc:body'/>
+ <xsl:apply-templates select='author|releaseinfo |
+ doc:author|doc:releaseinfo'
+ mode='doc:body'/>
<!-- current implementation ignores all other metadata -->
- <xsl:for-each select='*[not(self::title|self::subtitle|self::titleabbrev|self::author|self::releaseinfo)]'>
+ <xsl:for-each select='*[not(self::title|self::subtitle|self::titleabbrev|self::author|self::releaseinfo | self::doc:title|self::doc:subtitle|self::doc:titleabbrev|self::doc:author|self::doc:releaseinfo)]'>
<xsl:call-template name='doc:nomatch'/>
</xsl:for-each>
</xsl:template>
- <xsl:template match='title|subtitle|titleabbrev' mode='doc:body'>
+ <xsl:template match='title|subtitle|titleabbrev |
+ doc:title|doc:subtitle|doc:titleabbrev'
+ mode='doc:body'>
<xsl:call-template name='doc:make-paragraph'>
<xsl:with-param name='style'>
<xsl:choose>
- <xsl:when test='(parent::section or
- parent::sectioninfo/parent::section) and
- count(ancestor::section) > 5'>
+ <xsl:when test='(parent::section|parent::doc:section or
+ parent::sectioninfo/parent::section|parent::doc:sectioninfo/parent::doc:section) and
+ count(ancestor::section|ancestor::doc:section) > 5'>
<xsl:call-template name='doc:warning'>
<xsl:with-param name='message'>section nested deeper than 5 levels</xsl:with-param>
</xsl:call-template>
<xsl:text>sect5-</xsl:text>
- <xsl:value-of select='name()'/>
+ <xsl:value-of select='local-name()'/>
</xsl:when>
- <xsl:when test='parent::section or
- parent::sectioninfo/parent::section'>
+ <xsl:when test='parent::section|parent::doc:section or
+ parent::sectioninfo/parent::section|parent::doc:sectioninfo/parent::doc:section'>
<xsl:text>sect</xsl:text>
- <xsl:value-of select='count(ancestor::section)'/>
+ <xsl:value-of select='count(ancestor::section|ancestor::doc:section)'/>
<xsl:text>-</xsl:text>
- <xsl:value-of select='name()'/>
+ <xsl:value-of select='local-name()'/>
</xsl:when>
- <xsl:when test='contains(name(..), "info")'>
- <xsl:value-of select='name(../..)'/>
+ <xsl:when test='contains(local-name(..), "info")'>
+ <xsl:value-of select='local-name(../..)'/>
<xsl:text>-</xsl:text>
- <xsl:value-of select='name()'/>
+ <xsl:value-of select='local-name()'/>
</xsl:when>
<xsl:otherwise>
- <xsl:value-of select='name(..)'/>
+ <xsl:value-of select='local-name(..)'/>
<xsl:text>-</xsl:text>
- <xsl:value-of select='name()'/>
+ <xsl:value-of select='local-name()'/>
</xsl:otherwise>
</xsl:choose>
</xsl:with-param>
<xsl:with-param name='outline.level'
- select='count(ancestor::*) - count(parent::*[contains(name(), "info")]) - 1'/>
+ select='count(ancestor::*) - count(parent::*[contains(local-name(), "info")]) - 1'/>
<xsl:with-param name='attributes.node'
- select='../parent::*[contains(name(current()), "info")] |
- parent::*[not(contains(name(current()), "info"))]'/>
+ select='../parent::*[contains(local-name(current()), "info")] |
+ parent::*[not(contains(local-name(current()), "info"))]'/>
<xsl:with-param name='content'>
<xsl:apply-templates mode='doc:body'/>
</xsl:with-param>
<para>TODO: Handle all metadata elements, apart from titles.</para>
</doc:template>
- <xsl:template match='*[contains(name(), "info")]/*[not(self::title|self::subtitle|self::titleabbrev)]'
+ <xsl:template match='*[contains(local-name(), "info")]/*[not(self::title|self::subtitle|self::titleabbrev|self::doc:title|self::doc:subtitle|self::doc:titleabbrev)]'
priority='0'
mode='doc:body'/>
- <xsl:template match='author|editor|othercredit' mode='doc:body'>
+ <xsl:template match='author|editor|othercredit |
+ doc:author|doc:editor|doc:othercredit'
+ mode='doc:body'>
<xsl:call-template name='doc:make-paragraph'>
<xsl:with-param name='style'
- select='name()'/>
+ select='local-name()'/>
<xsl:with-param name='content'>
- <xsl:apply-templates select='personname|surname|firstname|honorific|lineage|othername|contrib'
+ <xsl:apply-templates select='personname|surname|firstname|honorific|lineage|othername|contrib |
+ doc:personname|doc:surname|doc:firstname|doc:honorific|doc:lineage|doc:othername|doc:contrib'
mode='doc:body'/>
</xsl:with-param>
</xsl:call-template>
- <xsl:apply-templates select='affiliation|address' mode='doc:body'/>
- <xsl:apply-templates select='authorblurb|personblurb' mode='doc:body'/>
+ <xsl:apply-templates select='affiliation|address |
+ doc:affiliation|doc:address'
+ mode='doc:body'/>
+ <xsl:apply-templates select='authorblurb|personblurb |
+ doc:authorblurb|doc:personblurb'
+ mode='doc:body'/>
</xsl:template>
- <xsl:template match='affiliation' mode='doc:body'>
+ <xsl:template match='affiliation|doc:affiliation'
+ mode='doc:body'>
<xsl:call-template name='doc:make-paragraph'>
<xsl:with-param name='style' select='"affiliation"'/>
<xsl:with-param name='content'>
</xsl:with-param>
</xsl:call-template>
</xsl:template>
- <xsl:template match='address[parent::author|parent::editor|parent::othercredit]'
+ <xsl:template match='address[parent::author|parent::editor|parent::othercredit] |
+ doc:address[parent::doc:author|parent::doc:editor|parent::doc:othercredit]'
mode='doc:body'>
<xsl:call-template name='doc:make-paragraph'>
<xsl:with-param name='style' select='"para-continue"'/>
</xsl:call-template>
</xsl:template>
<!-- do not attempt to handle recursive structures -->
- <xsl:template match='address[not(parent::author|parent::editor|parent::othercredit)]'
+ <xsl:template match='address[not(parent::author|parent::editor|parent::othercredit)] |
+ doc:address[not(parent::doc:author|parent::doc:editor|parent::doc:othercredit)]'
mode='doc:body'>
- <xsl:apply-templates select='node()[not(self::affiliation|self::authorblurb)]'/>
+ <xsl:apply-templates select='node()[not(self::affiliation|self::authorblurb|self::doc:affiliation|self::doc:authorblurb)]'/>
</xsl:template>
<!-- TODO -->
- <xsl:template match='authorblurb|personblurb'
+ <xsl:template match='authorblurb|personblurb |
+ doc:authorblurb|doc:personblurb'
mode='doc:body'/>
<!-- TODO: handle inline markup (eg. emphasis) -->
- <xsl:template match='surname|firstname|honorific|lineage|othername|contrib|email|shortaffil|jobtitle|orgname|orgdiv|street|pob|postcode|city|state|country|phone|fax|citetitle'
+ <xsl:template match='surname|firstname|honorific|lineage|othername|contrib|email|shortaffil|jobtitle|orgname|orgdiv|street|pob|postcode|city|state|country|phone|fax|citetitle |
+ doc:surname|doc:firstname|doc:honorific|doc:lineage|doc:othername|doc:contrib|doc:email|doc:shortaffil|doc:jobtitle|doc:orgname|doc:orgdiv|doc:street|doc:pob|doc:postcode|doc:city|doc:state|doc:country|doc:phone|doc:fax|doc:citetitle'
mode='doc:body'>
<xsl:if test='preceding-sibling::*'>
<xsl:call-template name='doc:make-phrase'>
</xsl:call-template>
</xsl:if>
<xsl:call-template name='doc:handle-linebreaks'>
- <xsl:with-param name='style' select='name()'/>
+ <xsl:with-param name='style' select='local-name()'/>
</xsl:call-template>
</xsl:template>
- <xsl:template match='email'
+ <xsl:template match='email|doc:email'
mode='doc:body'>
<xsl:variable name='address'>
<xsl:choose>
</xsl:call-template>
</xsl:template>
<!-- otheraddr often contains ulink -->
- <xsl:template match='otheraddr'
+ <xsl:template match='otheraddr|doc:otheraddr'
mode='doc:body'>
<xsl:choose>
- <xsl:when test='ulink'>
- <xsl:for-each select='ulink'>
- <xsl:variable name='prev' select='preceding-sibling::ulink[1]'/>
+ <xsl:when test='ulink|doc:ulink'>
+ <xsl:for-each select='ulink|doc:ulink'>
+ <xsl:variable name='prev'
+ select='preceding-sibling::ulink[1] |
+ preceding-sibling::doc:ulink[1]'/>
<xsl:choose>
<xsl:when test='$prev'>
<xsl:for-each
- select='preceding-sibling::node()[generate-id(following-sibling::ulink[1]) = generate-id(current())]'>
+ select='preceding-sibling::node()[generate-id(following-sibling::*[self::ulink|self::doc:ulink][1]) = generate-id(current())]'>
<xsl:call-template name='doc:handle-linebreaks'>
<xsl:with-param name='style'>otheraddr</xsl:with-param>
</xsl:call-template>
</xsl:choose>
<xsl:apply-templates select='.'/>
</xsl:for-each>
- <xsl:if test='ulink[last()]/following-sibling::node()'>
+ <xsl:if test='*[self::ulink|self::doc:ulink][last()]/following-sibling::node()'>
<xsl:call-template name='doc:handle-linebreaks'>
<xsl:with-param name='content'
- select='ulink[last()]/following-sibling::node()'/>
+ select='*[self::ulink|self::doc:ulink][last()]/following-sibling::node()'/>
<xsl:with-param name='style'>otheraddr</xsl:with-param>
</xsl:call-template>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
- <xsl:template match='ulink'
+ <xsl:template match='ulink|doc:ulink'
mode='doc:body'>
<xsl:call-template name='doc:make-hyperlink'>
<xsl:with-param name='target' select='@url'/>
</xsl:template>
<!-- Cannot round-trip this element -->
- <xsl:template match='personname'
+ <xsl:template match='personname|doc:personname'
mode='doc:body'>
<xsl:apply-templates/>
</xsl:template>
- <xsl:template match='releaseinfo'
+ <xsl:template match='releaseinfo|doc:releaseinfo'
mode='doc:body'>
<xsl:call-template name='doc:make-paragraph'>
- <xsl:with-param name='style' select='releaseinfo'/>
+ <xsl:with-param name='style'
+ select='"releaseinfo"'/>
</xsl:call-template>
</xsl:template>
- <xsl:template match='para'
+ <xsl:template match='para|doc:para'
mode='doc:body'>
<xsl:param name='class'/>
- <xsl:variable name='block' select='blockquote|calloutlist|classsynopsis|funcsynopsis|figure|glosslist|graphic|informalfigure|informaltable|itemizedlist|literallayout|mediaobject|mediaobjectco|note|caution|warning|important|tip|orderedlist|programlisting|revhistory|segmentedlist|simplelist|table|variablelist'/>
+ <xsl:variable name='block'
+ select='blockquote|calloutlist|classsynopsis|funcsynopsis|figure|glosslist|graphic|informalfigure|informaltable|itemizedlist|literallayout|mediaobject|mediaobjectco|note|caution|warning|important|tip|orderedlist|programlisting|revhistory|segmentedlist|simplelist|table|variablelist |
+ doc:blockquote|doc:calloutlist|doc:classsynopsis|doc:funcsynopsis|doc:figure|doc:glosslist|doc:graphic|doc:informalfigure|doc:informaltable|doc:itemizedlist|doc:literallayout|doc:mediaobject|doc:mediaobjectco|doc:note|doc:caution|doc:warning|doc:important|doc:tip|doc:orderedlist|doc:programlisting|doc:revhistory|doc:segmentedlist|doc:simplelist|doc:table|doc:variablelist'/>
<xsl:choose>
<xsl:when test='$block'>
</xsl:choose>
</xsl:with-param>
<xsl:with-param name='content'
- select='following-sibling::node()[generate-id(preceding-sibling::*[self::blockquote|self::calloutlist|self::figure|self::glosslist|self::graphic|self::informalfigure|self::informaltable|self::itemizedlist|self::literallayout|self::mediaobject|self::mediaobjectco|self::note|self::caution|self::warning|self::important|self::tip|self::orderedlist|self::programlisting|self::revhistory|self::segmentedlist|self::simplelist|self::table|self::variablelist][1]) = generate-id(current())]'/>
+ select='following-sibling::node()[generate-id(preceding-sibling::*[self::blockquote|self::calloutlist|self::figure|self::glosslist|self::graphic|self::informalfigure|self::informaltable|self::itemizedlist|self::literallayout|self::mediaobject|self::mediaobjectco|self::note|self::caution|self::warning|self::important|self::tip|self::orderedlist|self::programlisting|self::revhistory|self::segmentedlist|self::simplelist|self::table|self::variablelist | self::doc:blockquote|self::doc:calloutlist|self::doc:figure|self::doc:glosslist|self::doc:graphic|self::doc:informalfigure|self::doc:informaltable|self::doc:itemizedlist|self::doc:literallayout|self::doc:mediaobject|self::doc:mediaobjectco|self::doc:note|self::doc:caution|self::doc:warning|self::doc:important|self::doc:tip|self::doc:orderedlist|self::doc:programlisting|self::doc:revhistory|self::doc:segmentedlist|self::doc:simplelist|self::doc:table|self::doc:variablelist][1]) = generate-id(current())]'/>
</xsl:call-template>
</xsl:for-each>
</xsl:when>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
- <xsl:template match='simpara'
+ <xsl:template match='simpara|doc:simpara'
mode='doc:body'>
<xsl:param name='class'/>
</xsl:call-template>
</xsl:template>
- <xsl:template match='emphasis'
+ <xsl:template match='emphasis|doc:emphasis'
mode='doc:body'>
<xsl:call-template name='doc:make-phrase'>
<xsl:with-param name='italic'>
</xsl:call-template>
</xsl:template>
- <xsl:template match='informalfigure'
+ <xsl:template match='informalfigure|doc:informalfigure'
mode='doc:body'>
- <xsl:if test='mediaobject/imageobject/imagedata'>
+ <xsl:if test='mediaobject/imageobject/imagedata |
+ doc:mediaobject/doc:imageobject/doc:imagedata'>
<xsl:call-template name='doc:make-paragraph'>
<xsl:with-param name='style' select='"informalfigure-imagedata"'/>
<xsl:with-param name='content'>
<xsl:call-template name='doc:make-phrase'>
<xsl:with-param name='content'>
- <xsl:apply-templates select='mediaobject/imageobject/imagedata/@fileref'
+ <xsl:apply-templates select='mediaobject/imageobject/imagedata/@fileref |
+ doc:mediaobject/doc:imageobject/doc:imagedata/@fileref'
mode='textonly'/>
</xsl:with-param>
</xsl:call-template>
</xsl:with-param>
</xsl:call-template>
</xsl:if>
- <xsl:for-each select='*[not(self::mediaobject)]'>
+ <xsl:for-each select='*[not(self::mediaobject|self::doc:mediaobject)]'>
<xsl:call-template name='doc:nomatch'/>
</xsl:for-each>
</xsl:template>
- <xsl:template match='mediaobject|mediaobjectco'
+ <xsl:template match='mediaobject|mediaobjectco |
+ doc:mediaobject|doc:mediaobjectco'
mode='doc:body'>
- <xsl:apply-templates select='objectinfo/title'/>
- <xsl:apply-templates select='objectinfo/subtitle'/>
+ <xsl:apply-templates select='objectinfo/title|doc:objectinfo/doc:title'/>
+ <xsl:apply-templates select='objectinfo/subtitle|objectinfo/subtitle |
+ doc:objectinfo/doc:subtitle|doc:objectinfo/doc:subtitle'/>
<!-- TODO: indicate error for other children of objectinfo -->
- <xsl:apply-templates select='*[not(self::objectinfo)]'/>
+ <xsl:apply-templates select='*[not(self::objectinfo|self::doc:objectinfo)]'/>
</xsl:template>
- <xsl:template match='imageobject|imageobjectco|audioobject|videoobject'
+ <xsl:template match='imageobject|imageobjectco|audioobject|videoobject |
+ doc:imageobject|doc:imageobjectco|doc:audioobject|doc:videoobject'
mode='doc:body'>
- <xsl:apply-templates select='objectinfo/title'/>
- <xsl:apply-templates select='objectinfo/subtitle'/>
+ <xsl:apply-templates select='objectinfo/title|doc:objectinfo/doc:title'/>
+ <xsl:apply-templates select='objectinfo/subtitle|doc:objectinfo/doc:subtitle'/>
<!-- TODO: indicate error for other children of objectinfo -->
- <xsl:apply-templates select='areaspec'/>
+ <xsl:apply-templates select='areaspec|doc:areaspec'/>
<xsl:choose>
- <xsl:when test='imagedata|audiodata|videodata'>
+ <xsl:when test='imagedata|audiodata|videodata |
+ doc:imagedata|doc:audiodata|doc:videodata'>
<xsl:call-template name='doc:make-paragraph'>
<xsl:with-param name='style'
- select='concat(name(), "-", name(imagedata|audiodata|videodata))'/>
+ select='concat(local-name(), "-", local-name(imagedata|audiodata|videodata|doc:imagedata|doc:audiodata|doc:videodata))'/>
<xsl:with-param name='content'>
<xsl:call-template name='doc:make-phrase'>
<xsl:with-param name='content'>
</xsl:with-param>
</xsl:call-template>
</xsl:when>
- <xsl:when test='self::imageobjectco/imageobject/imagedata'>
+ <xsl:when test='self::imageobjectco/imageobject/imagedata |
+ self::doc:imageobjectco/doc:imageobject/doc:imagedata'>
<xsl:call-template name='doc:make-paragraph'>
<xsl:with-param name='style'
- select='concat(name(), "-imagedata")'/>
+ select='concat(local-name(), "-imagedata")'/>
<xsl:with-param name='content'>
<xsl:call-template name='doc:make-phrase'>
<xsl:with-param name='content'>
</xsl:call-template>
</xsl:when>
</xsl:choose>
- <xsl:apply-templates select='calloutlist'/>
+ <xsl:apply-templates select='calloutlist|doc:calloutlist'/>
<xsl:for-each select='*[not(self::imageobject |
self::imagedata |
self::audiodata |
self::videodata |
self::areaspec |
- self::calloutlist)]'>
+ self::calloutlist |
+ self::doc:imageobject |
+ self::doc:imagedata |
+ self::doc:audiodata |
+ self::doc:videodata |
+ self::doc:areaspec |
+ self::doc:calloutlist)]'>
<xsl:call-template name='doc:nomatch'/>
</xsl:for-each>
</xsl:template>
- <xsl:template match='textobject'
+ <xsl:template match='textobject|doc:textobject'
mode='doc:body'>
<xsl:choose>
- <xsl:when test='objectinfo/title|objectinfo|subtitle'>
- <xsl:apply-templates select='objectinfo/title'/>
- <xsl:apply-templates select='objectinfo/subtitle'/>
+ <xsl:when test='objectinfo/title|objectinfo|subtitle |
+ doc:objectinfo/doc:title|doc:objectinfo|doc:subtitle'>
+ <xsl:apply-templates select='objectinfo/title|doc:objectinfo/doc:title'/>
+ <xsl:apply-templates select='objectinfo/subtitle|doc:objectinfo/doc:subtitle'/>
<!-- TODO: indicate error for other children of objectinfo -->
</xsl:when>
<xsl:otherwise>
</xsl:otherwise>
</xsl:choose>
- <xsl:apply-templates select='*[not(self::objectinfo)]'/>
+ <xsl:apply-templates select='*[not(self::objectinfo|self::doc:objectinfo)]'/>
</xsl:template>
- <xsl:template match='caption'
+ <xsl:template match='caption|doc:caption'
mode='doc:body'>
<xsl:call-template name='doc:make-paragraph'>
<xsl:with-param name='style' select='"caption"'/>
<xsl:apply-templates/>
</xsl:when>
<xsl:otherwise>
- <xsl:apply-templates select='para[1]/node()'/>
- <xsl:for-each select='text()|*[not(self::para)]|para[position() != 1]'>
+ <xsl:apply-templates select='*[self::para|self::doc:para][1]/node()'/>
+ <xsl:for-each select='text()|*[not(self::para|self::doc:para)]|*[self::para|self::doc:para][position() != 1]'>
<xsl:call-template name='doc:nomatch'/>
</xsl:for-each>
</xsl:otherwise>
</xsl:call-template>
</xsl:template>
- <xsl:template match='area|areaspec'
+ <xsl:template match='area|areaspec|doc:area|doc:areaspec'
mode='doc:body'>
<xsl:call-template name='doc:make-paragraph'>
- <xsl:with-param name='style' select='name()'/>
+ <xsl:with-param name='style' select='local-name()'/>
<xsl:with-param name='content'/>
</xsl:call-template>
</xsl:template>
- <xsl:template match='calloutlist'
+ <xsl:template match='calloutlist|doc:calloutlist'
mode='doc:body'>
- <xsl:apply-templates select='callout'/>
+ <xsl:apply-templates select='callout|doc:callout'/>
</xsl:template>
- <xsl:template match='callout'
+ <xsl:template match='callout|doc:callout'
mode='doc:body'>
<xsl:call-template name='doc:make-paragraph'>
<xsl:with-param name='style' select='"callout"'/>
<xsl:with-param name='content'>
<!-- Normally a para would be the first child of a callout -->
- <xsl:apply-templates select='*[1][self::para]/node()' mode='list'/>
+ <xsl:apply-templates select='*[1][self::para|self::doc:para]/node()'
+ mode='list'/>
</xsl:with-param>
</xsl:call-template>
<!-- This is to catch the case where a listitem's first child is not a paragraph.
- We may not be able to represent this properly.
-->
- <xsl:apply-templates select='*[1][not(self::para)]' mode='list'/>
+ <xsl:apply-templates select='*[1][not(self::para|self::doc:para)]'
+ mode='list'/>
- <xsl:apply-templates select='*[position() != 1]' mode='list'/>
+ <xsl:apply-templates select='*[position() != 1]'
+ mode='list'/>
</xsl:template>
- <xsl:template match='table|informaltable' mode='doc:body'>
+ <xsl:template match='table|informaltable |
+ doc:table|doc:informaltable'
+ mode='doc:body'>
<xsl:call-template name='doc:make-table'>
<xsl:with-param name='columns'>
- <xsl:apply-templates select='tgroup/colspec' mode='doc:column'/>
+ <xsl:apply-templates select='tgroup/colspec|doc:tgroup/doc:colspec'
+ mode='doc:column'/>
</xsl:with-param>
</xsl:call-template>
</xsl:template>
- <xsl:template match='colspec' mode='doc:column'>
+ <xsl:template match='colspec|doc:colspec' mode='doc:column'>
<xsl:call-template name='doc:make-column'>
<xsl:with-param name='width' select='@colwidth'/>
</xsl:call-template>
</xsl:template>
- <xsl:template match='colspec' mode='doc:body'/>
+ <xsl:template match='colspec|doc:colspec' mode='doc:body'/>
<xsl:template name='doc:repeat'>
<xsl:param name='repeats' select='0'/>
</xsl:call-template>
</xsl:if>
</xsl:template>
- <xsl:template match='tgroup|tbody|thead' mode='doc:body'>
+ <xsl:template match='tgroup|tbody|thead |
+ doc:tgroup|doc:tbody|doc:thead'
+ mode='doc:body'>
<xsl:apply-templates/>
</xsl:template>
- <xsl:template match='row' mode='doc:body'>
+ <xsl:template match='row|doc:row' mode='doc:body'>
<xsl:call-template name='doc:make-table-row'>
- <xsl:with-param name='is-header' select='boolean(parent::thead)'/>
+ <xsl:with-param name='is-header' select='boolean(parent::thead|parent::doc:thead)'/>
</xsl:call-template>
</xsl:template>
- <xsl:template match='entry' mode='doc:body'>
+ <xsl:template match='entry|doc:entry' mode='doc:body'>
<!--
Position = Sum(i,preceding-sibling[@colspan = ""]) + entry[i].@colspan)
<xsl:variable name='combinedWidth'>
<xsl:call-template name='doc:sum'>
- <xsl:with-param name='nodes' select='ancestor::*[self::table|self::informaltable][1]/tgroup/colspec[not(position() < $position) and position() < $limit]'/>
+ <xsl:with-param name='nodes' select='ancestor::*[self::table|self::doc:table|self::informaltable|self::doc:informaltable][1]/*[self::tgroup|self::doc:tgroup]/*[self::colspec|self::doc:colspec][not(position() < $position) and position() < $limit]'/>
<xsl:with-param name='sum' select='"0"'/>
</xsl:call-template>
</xsl:variable>
<xsl:value-of select='$combinedWidth'/>
</xsl:when>
<xsl:otherwise>
- <xsl:value-of select='ancestor::*[self::table|self::informaltable][1]/tgroup/colspec[position() = $position]/@colwidth'/>
+ <xsl:value-of select='ancestor::*[self::table|self::doc:table|self::informaltable|self::doc:informaltable][1]/*[self::tgroup|self::doc:tgroup]/*[self::colspec|self::doc:colspec][position() = $position]/@colwidth'/>
</xsl:otherwise>
</xsl:choose>
</xsl:with-param>
<xsl:with-param name='content'>
<xsl:choose>
- <xsl:when test='not(para)'>
+ <xsl:when test='not(para|doc:para)'>
<!-- TODO: check for any block elements -->
<xsl:call-template name='doc:make-paragraph'/>
</xsl:when>
<xsl:variable name='add'>
<xsl:choose>
- <xsl:when test='$node/preceding-sibling::entry/@colspan != ""'>
- <xsl:value-of select='$node/preceding-sibling::entry/@colspan'/>
+ <xsl:when test='$node/preceding-sibling::*[self::entry|self::doc:entry]/@colspan != ""'>
+ <xsl:value-of select='$node/preceding-sibling::*[self::entry|self::doc:entry]/@colspan'/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select='"1"'/>
</xsl:variable>
<xsl:choose>
- <xsl:when test='count($node/preceding-sibling::entry) > 0'>
+ <xsl:when test='count($node/preceding-sibling::*[self::entry|self::doc:entry]) > 0'>
<xsl:call-template name='doc:sum-sibling'>
<xsl:with-param name='sum' select='$sum + $add'/>
- <xsl:with-param name='node' select='$node/preceding-sibling::entry[1]'/>
+ <xsl:with-param name='node'
+ select='$node/preceding-sibling::*[self::entry|self::doc:entry][1]'/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select='$sum'/>
</xsl:otherwise>
</xsl:choose>
-
+
</xsl:template>
<xsl:template name='doc:sum'>
</xsl:template>
- <xsl:template match='*[self::para|self::simpara]/text()[string-length(normalize-space(.)) != 0]'
+ <xsl:template match='*[self::para|self::simpara|self::doc:para|self::doc:simpara]/text()[string-length(normalize-space(.)) != 0]'
mode='doc:body'>
<xsl:call-template name='doc:handle-linebreaks'/>
</xsl:template>
- <xsl:template match='text()[not(parent::para|parent::simpara|parent::literallayout|parent::programlisting)][string-length(normalize-space(.)) != 0]'
+ <xsl:template match='text()[not(parent::para|parent::simpara|parent::literallayout|parent::programlisting | parent::doc:para|parent::doc:simpara|parent::doc:literallayout|parent::doc:programlisting)][string-length(normalize-space(.)) != 0]'
mode='doc:body'>
<xsl:call-template name='doc:handle-linebreaks'/>
</xsl:template>
<xsl:template match='text()[string-length(normalize-space(.)) = 0]'
mode='doc:body'/>
- <xsl:template match='literallayout/text()|programlisting/text()'
+ <xsl:template match='literallayout/text()|programlisting/text() |
+ doc:literallayout/text()|doc:programlisting/text()'
mode='doc:body'>
<xsl:call-template name='doc:handle-linebreaks'/>
</xsl:template>
</xsl:choose>
</xsl:template>
- <xsl:template match='authorblurb|formalpara|legalnotice|note|caution|warning|important|tip'
+ <xsl:template match='authorblurb|formalpara|legalnotice|note|caution|warning|important|tip |
+ doc:authorblurb|doc:formalpara|doc:legalnotice|doc:note|doc:caution|doc:warning|doc:important|doc:tip'
mode='doc:body'>
<xsl:apply-templates select='*'>
<xsl:with-param name='class'>
- <xsl:value-of select='name()'/>
+ <xsl:value-of select='local-name()'/>
</xsl:with-param>
</xsl:apply-templates>
</xsl:template>
- <xsl:template match='blockquote'
+ <xsl:template match='blockquote|doc:blockquote'
mode='doc:body'>
- <xsl:apply-templates select='blockinfo|title'>
+ <xsl:apply-templates select='blockinfo|title|doc:blockinfo|doc:title'>
<xsl:with-param name='class'>
- <xsl:value-of select='name()'/>
+ <xsl:value-of select='local-name()'/>
</xsl:with-param>
</xsl:apply-templates>
- <xsl:apply-templates select='*[not(self::blockinfo|self::title|self::attribution)]'>
+ <xsl:apply-templates select='*[not(self::blockinfo|self::title|self::attribution|self::doc:blockinfo|self::doc:title|self::doc:attribution)]'>
<xsl:with-param name='class' select='"blockquote"'/>
</xsl:apply-templates>
- <xsl:if test='attribution'>
+ <xsl:if test='attribution|doc:attribution'>
<xsl:call-template name='doc:make-paragraph'>
<xsl:with-param name='style' select='"blockquote-attribution"'/>
<xsl:with-param name='content'>
- <xsl:apply-templates select='attribution/node()'/>
+ <xsl:apply-templates select='attribution/node()|doc:attribution/node()'/>
</xsl:with-param>
</xsl:call-template>
</xsl:if>
</xsl:template>
- <xsl:template match='literallayout|programlisting'
+ <xsl:template match='literallayout|programlisting|doc:literallayout|doc:programlisting'
mode='doc:body'>
<xsl:param name='class'/>
<xsl:call-template name='doc:make-paragraph'>
- <xsl:with-param name='style' select='name()'/>
+ <xsl:with-param name='style' select='local-name()'/>
</xsl:call-template>
</xsl:template>
- <xsl:template match='bridgehead'
+ <xsl:template match='bridgehead|doc:bridgehead'
mode='doc:body'>
<xsl:call-template name='doc:make-paragraph'>
<xsl:with-param name='style' select='"bridgehead"'/>
</xsl:call-template>
</xsl:template>
- <xsl:template match='itemizedlist|orderedlist'
+ <xsl:template match='itemizedlist|orderedlist |
+ doc:itemizedlist|doc:orderedlist'
mode='doc:body'>
- <xsl:apply-templates select='listitem'
+ <xsl:apply-templates select='listitem|doc:listitem'
mode='doc:body'/>
</xsl:template>
- <xsl:template match='listitem'
+ <xsl:template match='listitem|doc:listitem'
mode='doc:body'>
<xsl:call-template name='doc:make-paragraph'>
<xsl:with-param name='style'
- select='concat(name(..),
- count(ancestor::itemizedlist|ancestor::orderedlist))'/>
+ select='concat(local-name(..),
+ count(ancestor::itemizedlist|ancestor::orderedlist|ancestor::doc:itemizedlist|ancestor::doc:orderedlist))'/>
<xsl:with-param name='is-listitem' select='true()'/>
<xsl:with-param name='content'>
<!-- Normally a para would be the first child of a listitem -->
- <xsl:apply-templates select='*[1][self::para]/node()' mode='list'/>
+ <xsl:apply-templates select='*[1][self::para|self::doc:para]/node()'
+ mode='list'/>
</xsl:with-param>
</xsl:call-template>
<!-- This is to catch the case where a listitem's first child is not a paragraph.
- We may not be able to represent this properly.
-->
- <xsl:apply-templates select='*[1][not(self::para)]' mode='doc:list'/>
+ <xsl:apply-templates select='*[1][not(self::para|self::doc:para)]'
+ mode='doc:list'/>
- <xsl:apply-templates select='*[position() != 1]' mode='doc:list'/>
+ <xsl:apply-templates select='*[position() != 1]'
+ mode='doc:list'/>
</xsl:template>
<xsl:template match='*' mode='doc:list'>
</xsl:apply-templates>
</xsl:template>
- <xsl:template match='variablelist'
+ <xsl:template match='variablelist|doc:variablelist'
mode='doc:body'>
- <xsl:apply-templates select='*[not(self::varlistentry)]'/>
+ <xsl:apply-templates select='*[not(self::varlistentry|self::doc:varlistentry)]'/>
<xsl:call-template name='doc:make-table'>
<xsl:with-param name='columns'>
</xsl:call-template>
</xsl:with-param>
<xsl:with-param name='rows'>
- <xsl:apply-templates select='varlistentry'/>
+ <xsl:apply-templates select='varlistentry|doc:varlistentry'/>
</xsl:with-param>
</xsl:call-template>
</xsl:template>
- <xsl:template match='varlistentry'
+ <xsl:template match='varlistentry|doc:varlistentry'
mode='doc:body'>
<xsl:call-template name='doc:make-table-row'>
<xsl:with-param name='content'>
<xsl:call-template name='doc:make-paragraph'>
<xsl:with-param name='style' select='"variablelist-term"'/>
<xsl:with-param name='content'>
- <xsl:apply-templates select='term[1]/node()'/>
- <xsl:for-each select='term[position() != 1]'>
+ <xsl:apply-templates select='*[self::term|self::doc:term][1]/node()'/>
+ <xsl:for-each select='*[self::term|self::doc:term][position() != 1]'>
<xsl:call-template name='doc:make-phrase'>
<xsl:with-param name='content'>
<xsl:call-template name='doc:make-soft-break'/>
</xsl:call-template>
<xsl:call-template name='doc:make-table-cell'>
<xsl:with-param name='content'>
- <xsl:apply-templates select='listitem/node()'/>
+ <xsl:apply-templates select='listitem/node()|doc:listitem/node()'/>
</xsl:with-param>
</xsl:call-template>
</xsl:with-param>
constraint|
indexterm|itermset|
keywordset|
- msg'
+ msg |
+ doc:anchor|doc:areaset|doc:audiodata|doc:audioobject|
+ doc:beginpage|
+ doc:constraint|
+ doc:indexterm|doc:itermset|
+ doc:keywordset|
+ doc:msg'
mode='doc:body'/>
<xsl:template match='*' name='doc:nomatch'>
<xsl:message>
- <xsl:value-of select='name()'/>
+ <xsl:value-of select='local-name()'/>
<xsl:text> encountered</xsl:text>
<xsl:if test='parent::*'>
<xsl:text> in </xsl:text>
- <xsl:value-of select='name(parent::*)'/>
+ <xsl:value-of select='local-name(parent::*)'/>
</xsl:if>
<xsl:text>, but no template matches.</xsl:text>
</xsl:message>
self::toc |
self::videodata |
self::videoobject |
- self::*[not(starts-with(name(), "informal")) and contains(name(), "info")]'>
+
+ self::doc:abstract |
+ self::doc:ackno |
+ self::doc:address |
+ self::doc:answer |
+ self::doc:appendix |
+ self::doc:artheader |
+ self::doc:authorgroup |
+ self::doc:bibliodiv |
+ self::doc:biblioentry |
+ self::doc:bibliography |
+ self::doc:bibliomixed |
+ self::doc:bibliomset |
+ self::doc:biblioset |
+ self::doc:bridgehead |
+ self::doc:calloutlist |
+ self::doc:caption |
+ self::doc:classsynopsis |
+ self::doc:colophon |
+ self::doc:constraintdef |
+ self::doc:copyright |
+ self::doc:dedication |
+ self::doc:epigraph |
+ self::doc:equation |
+ self::doc:example |
+ self::doc:figure |
+ self::doc:funcsynopsis |
+ self::doc:glossary |
+ self::doc:glossdef |
+ self::doc:glossdiv |
+ self::doc:glossentry |
+ self::doc:glosslist |
+ self::doc:graphic |
+ self::doc:highlights |
+ self::doc:imageobject |
+ self::doc:imageobjectco |
+ self::doc:index |
+ self::doc:indexdiv |
+ self::doc:indexentry |
+ self::doc:informalequation |
+ self::doc:informalexample |
+ self::doc:informalfigure |
+ self::doc:lot |
+ self::doc:lotentry |
+ self::doc:mediaobject |
+ self::doc:mediaobjectco |
+ self::doc:member |
+ self::doc:msgentry |
+ self::doc:msgset |
+ self::doc:part |
+ self::doc:partintro |
+ self::doc:personblurb |
+ self::doc:preface |
+ self::doc:printhistory |
+ self::doc:procedure |
+ self::doc:programlisting |
+ self::doc:programlistingco |
+ self::doc:publisher |
+ self::doc:qandadiv |
+ self::doc:qandaentry |
+ self::doc:qandaset |
+ self::doc:question |
+ self::doc:refdescriptor |
+ self::doc:refentry |
+ self::doc:refentrytitle |
+ self::doc:reference |
+ self::doc:refmeta |
+ self::doc:refname |
+ self::doc:refnamediv |
+ self::doc:refpurpose |
+ self::doc:refsect1 |
+ self::doc:refsect2 |
+ self::doc:refsect3 |
+ self::doc:refsection |
+ self::doc:refsynopsisdiv |
+ self::doc:screen |
+ self::doc:screenco |
+ self::doc:screenshot |
+ self::doc:seg |
+ self::doc:seglistitem |
+ self::doc:segmentedlist |
+ self::doc:segtitle |
+ self::doc:set |
+ self::doc:setindex |
+ self::doc:sidebar |
+ self::doc:simplelist |
+ self::doc:simplemsgentry |
+ self::doc:step |
+ self::doc:stepalternatives |
+ self::doc:subjectset |
+ self::doc:substeps |
+ self::doc:task |
+ self::doc:textobject |
+ self::doc:toc |
+ self::doc:videodata |
+ self::doc:videoobject |
+
+ self::*[not(starts-with(local-name(), "informal")) and contains(local-name(), "info")]'>
<xsl:call-template name='doc:make-paragraph'>
<xsl:with-param name='style' select='"blockerror"'/>
<xsl:with-param name='content'>
<xsl:call-template name='doc:make-phrase'>
<xsl:with-param name='content'>
- <xsl:value-of select='name()'/>
+ <xsl:value-of select='local-name()'/>
<xsl:text> encountered</xsl:text>
<xsl:if test='parent::*'>
<xsl:text> in </xsl:text>
- <xsl:value-of select='name(parent::*)'/>
+ <xsl:value-of select='local-name(parent::*)'/>
</xsl:if>
<xsl:text>, but no template matches.</xsl:text>
</xsl:with-param>
self::jobtitle |
self::personname |
self::publishername |
- self::remark'>
+ self::remark |
+
+ self::doc:affiliation |
+ self::doc:alt |
+ self::doc:attribution |
+ self::doc:collab |
+ self::doc:collabname |
+ self::doc:confdates |
+ self::doc:confgroup |
+ self::doc:confnum |
+ self::doc:confsponsor |
+ self::doc:conftitle |
+ self::doc:contractnum |
+ self::doc:contractsponsor |
+ self::doc:contrib |
+ self::doc:corpauthor |
+ self::doc:corpcredit |
+ self::doc:corpname |
+ self::doc:edition |
+ self::doc:editor |
+ self::doc:jobtitle |
+ self::doc:personname |
+ self::doc:publishername |
+ self::doc:remark'>
</xsl:when>
-->
<xsl:call-template name='doc:make-phrase'>
<xsl:with-param name='style' select='"inlineerror"'/>
<xsl:with-param name='content'>
- <xsl:value-of select='name()'/>
+ <xsl:value-of select='local-name()'/>
<xsl:text> encountered</xsl:text>
<xsl:if test='parent::*'>
<xsl:text> in </xsl:text>
- <xsl:value-of select='name(parent::*)'/>
+ <xsl:value-of select='local-name(parent::*)'/>
</xsl:if>
<xsl:text>, but no template matches.</xsl:text>
</xsl:with-param>