Bug 733402

Summary: Publican does not detect an incorrect name of a tag property
Product: [Community] Publican Reporter: Eva Kopalova <ekopalov>
Component: publicanAssignee: Jeff Fearn 🐞 <jfearn>
Status: CLOSED NOTABUG QA Contact: Ruediger Landmann <rlandman+disabled>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 2.6CC: jhradile, mmcallis, publican-list
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-08-25 22:34:46 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
the incorrect rendering none

Description Eva Kopalova 2011-08-25 16:03:40 UTC
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.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.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 16:04:51 UTC
Created attachment 519918 [details]
the incorrect rendering

Comment 2 Jeff Fearn 🐞 2011-08-25 22:34:46 UTC
(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.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.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