Bug 733402 - Publican does not detect an incorrect name of a tag property
Summary: Publican does not detect an incorrect name of a tag property
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Publican
Classification: Community
Component: publican
Version: 2.6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jeff Fearn 🐞
QA Contact: Ruediger Landmann
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-08-25 16:03 UTC by Eva Kopalova
Modified: 2016-06-17 21:10 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-08-25 22:34:46 UTC
Embargoed:


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

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


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