Bug 733402 - Publican does not detect an incorrect name of a tag property
Publican does not detect an incorrect name of a tag property
Status: CLOSED NOTABUG
Product: Publican
Classification: Community
Component: publican (Show other bugs)
2.6
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Jeff Fearn
Ruediger Landmann
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-08-25 12:03 EDT by Eva Kopalova
Modified: 2016-06-17 17:10 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-08-25 18:34:46 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
the incorrect rendering (36.72 KB, image/png)
2011-08-25 12:04 EDT, Eva Kopalova
no flags Details

  None (edit)
Description Eva Kopalova 2011-08-25 12:03:40 EDT
Description of problem:
Publican does not detect a dtd violation

Version-Release number of selected component (if applicable):
2.6 (with the JBoss brand; but occurs on all brands)

How reproducible:
<note>
  <title>A roles properties file</title>
  <para>blabla</para>
  <example id="example-user_properties_file">
     <title>A roles properties file</title>
     <para>
<programlisting lang="Java">
# A roles.properties file for use with the UsersRolesLoginModule
darranl@KERBEROS.JBOSS.ORG=Users
</programlisting>
     </para>
  </example>
</note>
   

Steps to Reproduce:
1. Build the text above into an html-single document (I had it in a chapter and section)
  
Actual results:
The text is rendered without the programlisting content ("# A roles.properties file for use with the UsersRolesLoginModule
darranl@KERBEROS.JBOSS.ORG=Users" is NOT shown)

Expected results:
Publican building fails due to an incorrect argument in the programlisting tag (I have "lang"; should be "language")

Additional info:
If you get rid of the para tag around the programlisting, publican build will fail with: 

general_installation.xml:185: validity error : Element example content does not follow the DTD, expecting (blockinfo? , (title , titleabbrev?) , (calloutlist | glosslist | bibliolist | itemizedlist | orderedlist | segmentedlist | simplelist | variablelist | literallayout | programlisting | programlistingco | screen | screenco | screenshot | synopsis | cmdsynopsis | funcsynopsis | classsynopsis | fieldsynopsis | constructorsynopsis | destructorsynopsis | methodsynopsis | formalpara | para | simpara | address | blockquote | graphic | graphicco | mediaobject | mediaobjectco | informalequation | informalexample | informalfigure | informaltable | indexterm | beginpage | procedure)+), got (title )

So it cannot see the programlisting tag.

Good luck!
Comment 1 Eva Kopalova 2011-08-25 12:04:51 EDT
Created attachment 519918 [details]
the incorrect rendering
Comment 2 Jeff Fearn 2011-08-25 18:34:46 EDT
(In reply to comment #0)
> Description of problem:
> Publican does not detect a dtd violation

This is not a DTD violation, lang is a valid attribute for every tag in DocBook 4.

http://www.docbook.org/tdg/en/html/ref-elements.html#common.attributes

> Version-Release number of selected component (if applicable):
> 2.6 (with the JBoss brand; but occurs on all brands)
> 
> How reproducible:
> <note>
>   <title>A roles properties file</title>
>   <para>blabla</para>
>   <example id="example-user_properties_file">
>      <title>A roles properties file</title>
>      <para>
> <programlisting lang="Java">
> # A roles.properties file for use with the UsersRolesLoginModule
> darranl@KERBEROS.JBOSS.ORG=Users
> </programlisting>
>      </para>
>   </example>
> </note>
> 
> 
> Steps to Reproduce:
> 1. Build the text above into an html-single document (I had it in a chapter and
> section)
> 
> Actual results:
> The text is rendered without the programlisting content ("# A roles.properties
> file for use with the UsersRolesLoginModule
> darranl@KERBEROS.JBOSS.ORG=Users" is NOT shown)

The reason the programlisting is not displayed is because "Java" does not match the current lang, probably "en-US", so publican does exactly what you have asked it to, it excludes the content.

> Expected results:
> Publican building fails due to an incorrect argument in the programlisting tag
> (I have "lang"; should be "language")

Every time we and add code to try and figure out an authors intention we end up causing more problems than we solve, so I'm very reluctant to try and figure out when people are using wrong, yet valid, attributes.

DocBook 5 has changed from the non-standard lang attribute to the standard xml:lang attribute, this should make this kind of attribute misuse less likely. See https://bugzilla.redhat.com/show_bug.cgi?id=696397

Note You need to log in before you can comment on or make changes to this bug.