]> granicus.if.org Git - docbook-dsssl/commitdiff
added error checking for publisher-address
authorSteve Ball <balls@users.sourceforge.net>
Tue, 26 Aug 2008 01:10:14 +0000 (01:10 +0000)
committerSteve Ball <balls@users.sourceforge.net>
Tue, 26 Aug 2008 01:10:14 +0000 (01:10 +0000)
xsl/roundtrip/blocks2dbk.xsl

index f9d710e350dae7cf18be3073661339626333617b..d70082fd77ab5dd8d0ccebe71104dd84da04fdb0 100644 (file)
           mode='rnd:metadata'/>
       </xsl:when>
 
+      <xsl:when test='@rnd:style = "publisher-address" and
+                      preceding-sibling::*[1][not(self::dbk:para) or not(@rnd:style = "publisher")]'>
+        <xsl:call-template name='rnd:error'>
+          <xsl:with-param name='code'>bad-publisher-address</xsl:with-param>
+          <xsl:with-param name='message'>publisher-address must follow publisher</xsl:with-param>
+        </xsl:call-template>
+        <xsl:apply-templates select='following-sibling::*[1]'
+          mode='rnd:metadata'/>
+      </xsl:when>
       <xsl:when test='@rnd:style = "publisher-address"'>
         <xsl:apply-templates select='following-sibling::*[1]'
           mode='rnd:metadata'/>