Browse Source

Remove <emphasis> to work around DocBook bug

It was determined (through painful trial and error) that after the
upgrade to DocBook 5 and the gradle-docbook-reference plugin, that
<emphasis> elements embedded within <programlisting> elements causes
NullPointerExceptions during processing.

This change eliminates these <emphasis> elements to work around the
problem. This means a slight degradation in presentation for the
affected areas of the reference documentation. After some research,
it is not clear what other workarounds may be possible that leave
the text actually emphasized.
pull/22/head
Chris Beams 14 years ago
parent
commit
7a3aa70565
  1. 9
      src/reference/docbook/aop.xml
  2. 2
      src/reference/docbook/beans-customizing.xml
  3. 13
      src/reference/docbook/beans-extension-points.xml
  4. 18
      src/reference/docbook/beans-scopes.xml
  5. 2
      src/reference/docbook/beans.xml
  6. 7
      src/reference/docbook/index.xml
  7. 10
      src/reference/docbook/jdbc.xml
  8. 21
      src/reference/docbook/spring.tld.xml
  9. 3
      src/reference/docbook/swf-sidebar.xml
  10. 3
      src/reference/docbook/view.xml

9
src/reference/docbook/aop.xml

@ -2572,7 +2572,8 @@ public @interface Idempotent { @@ -2572,7 +2572,8 @@ public @interface Idempotent {
the value of the <literal>proxy-target-class</literal> attribute of the
<literal>&lt;aop:config&gt;</literal> element to true:</para>
<programlisting language="xml">&lt;aop:config <emphasis role="bold">proxy-target-class="true"</emphasis>&gt;
<!-- removed <emphasis> below to solve NPE problem -->
<programlisting language="xml">&lt;aop:config proxy-target-class="true"&gt;
<lineannotation>&lt;!-- other beans defined here... --&gt;</lineannotation>
&lt;/aop:config&gt;</programlisting>
@ -2581,7 +2582,8 @@ public @interface Idempotent { @@ -2581,7 +2582,8 @@ public @interface Idempotent {
<literal>&lt;aop:aspectj-autoproxy&gt;</literal> element to
<literal>true</literal>:</para>
<programlisting language="xml">&lt;aop:aspectj-autoproxy <emphasis role="bold">proxy-target-class="true"</emphasis>/&gt;</programlisting>
<!-- removed <emphasis> below to solve NPE problem -->
<programlisting language="xml">&lt;aop:aspectj-autoproxy proxy-target-class="true"/&gt;</programlisting>
<note>
<para>Multiple <literal>&lt;aop:config/&gt;</literal> sections are
@ -3596,6 +3598,7 @@ http://www.springframework.org/schema/context @@ -3596,6 +3598,7 @@ http://www.springframework.org/schema/context
<literal>&lt;context:load-time-weaver/&gt;</literal> element. Find
below an example of doing just that:</para>
<!-- removed <emphasis> below to solve NPE problem -->
<programlisting language="xml">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@ -3607,7 +3610,7 @@ http://www.springframework.org/schema/context @@ -3607,7 +3610,7 @@ http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd"&gt;
&lt;context:load-time-weaver
<emphasis role="bold">weaver-class="org.springframework.instrument.classloading.ReflectiveLoadTimeWeaver"</emphasis>/&gt;
weaver-class="org.springframework.instrument.classloading.ReflectiveLoadTimeWeaver"/&gt;
&lt;/beans&gt;</programlisting>

2
src/reference/docbook/beans-customizing.xml

@ -168,7 +168,7 @@ @@ -168,7 +168,7 @@
}
}</programlisting>
<programlisting language="xml">&lt;beans <emphasis role="bold">default-init-method="init"</emphasis>&gt;
<programlisting language="xml">&lt;beans default-init-method="init"&gt;
&lt;bean id="blogService" class="com.foo.DefaultBlogService"&gt;
&lt;property name="blogDao" ref="blogDao" /&gt;

13
src/reference/docbook/beans-extension-points.xml

@ -161,7 +161,7 @@ public class InstantiationTracingBeanPostProcessor implements BeanPostProcessor @@ -161,7 +161,7 @@ public class InstantiationTracingBeanPostProcessor implements BeanPostProcessor
<lineannotation>// simply return the instantiated bean as-is</lineannotation>
public Object postProcessBeforeInitialization(Object bean, String beanName)
throws BeansException {
return bean; <lineannotation>// we could potentially return <emphasis>any</emphasis> object reference here...</lineannotation>
return bean; <lineannotation>// we could potentially return any object reference here...</lineannotation>
}
public Object postProcessAfterInitialization(Object bean, String beanName)
@ -351,10 +351,10 @@ org.springframework.scripting.groovy.GroovyMessenger@272961</programlisting> @@ -351,10 +351,10 @@ org.springframework.scripting.groovy.GroovyMessenger@272961</programlisting>
&lt;bean id="dataSource" destroy-method="close"
class="org.apache.commons.dbcp.BasicDataSource"&gt;
&lt;property name="driverClassName" value="<emphasis role="bold">${jdbc.driverClassName}</emphasis>"/&gt;
&lt;property name="url" value="<emphasis role="bold">${jdbc.url}</emphasis>"/&gt;
&lt;property name="username" value="<emphasis role="bold">${jdbc.username}</emphasis>"/&gt;
&lt;property name="password" value="<emphasis role="bold">${jdbc.password}</emphasis>"/&gt;
&lt;property name="driverClassName" value="${jdbc.driverClassName}"/&gt;
&lt;property name="url" value="${jdbc.url}"/&gt;
&lt;property name="username" value="${jdbc.username}"/&gt;
&lt;property name="password" value="${jdbc.password}"/&gt;
&lt;/bean&gt;</programlisting>
<para>The actual values come from another file in the standard Java
@ -472,7 +472,7 @@ dataSource.url=jdbc:mysql:mydb</programlisting> @@ -472,7 +472,7 @@ dataSource.url=jdbc:mysql:mydb</programlisting>
already non-null (presumably initialized by the constructors). In this
example...</para>
<programlisting language="java">foo.fred.bob.sammy=123</programlisting>
<programlisting>foo.fred.bob.sammy=123</programlisting>
<para>... the <literal>sammy</literal> property of the
<literal>bob</literal> property of the <literal>fred</literal> property
@ -491,6 +491,7 @@ dataSource.url=jdbc:mysql:mydb</programlisting> @@ -491,6 +491,7 @@ dataSource.url=jdbc:mysql:mydb</programlisting>
configuration element:</para>
<programlisting language="xml">&lt;context:property-override location="classpath:override.properties"/&gt;</programlisting>
</section>
</section>

18
src/reference/docbook/beans-scopes.xml

@ -404,16 +404,16 @@ @@ -404,16 +404,16 @@
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd"&gt;
<lineannotation>&lt;!-- an HTTP <interfacename>Session</interfacename>-scoped bean exposed as a proxy --&gt;</lineannotation>
&lt;bean id="userPreferences" class="com.foo.UserPreferences" <emphasis role="bold">scope="session"</emphasis>&gt;
&lt;bean id="userPreferences" class="com.foo.UserPreferences" scope="session"&gt;
<lineannotation>&lt;!-- instructs the container to proxy the surrounding bean --&gt;</lineannotation>
<emphasis role="bold">&lt;aop:scoped-proxy/&gt;</emphasis>
&lt;aop:scoped-proxy/&gt;
&lt;/bean&gt;
<lineannotation>&lt;!-- a singleton-scoped bean <emphasis role="bold">injected with a proxy to the above bean</emphasis> --&gt;</lineannotation>
<lineannotation>&lt;!-- a singleton-scoped bean injected with a proxy to the above bean --&gt;</lineannotation>
&lt;bean id="userService" class="com.foo.SimpleUserService"&gt;
<lineannotation>&lt;!-- a reference to the <emphasis role="bold">proxied</emphasis> <literal>userPreferences</literal> bean --&gt;</lineannotation>
<lineannotation>&lt;!-- a reference to the proxied <literal>userPreferences</literal> bean --&gt;</lineannotation>
&lt;property name="userPreferences" ref="userPreferences"/&gt;
&lt;/bean&gt;
@ -489,7 +489,7 @@ @@ -489,7 +489,7 @@
objects:</para>
<programlisting language="xml">&lt;bean id="userPreferences" class="com.foo.UserPreferences" scope="session"&gt;
<emphasis role="bold"><literal>&lt;aop:scoped-proxy/&gt;</literal></emphasis>
<literal>&lt;aop:scoped-proxy/&gt;</literal>
&lt;/bean&gt;
&lt;bean id="userManager" class="com.foo.UserManager"&gt;
@ -524,7 +524,7 @@ @@ -524,7 +524,7 @@
<programlisting language="xml"><lineannotation>&lt;!-- <classname>DefaultUserPreferences</classname> implements the <interfacename>UserPreferences</interfacename> interface --&gt;</lineannotation>
&lt;bean id="userPreferences" class="com.foo.DefaultUserPreferences" scope="session"&gt;
&lt;aop:scoped-proxy <emphasis role="bold">proxy-target-class="false"<literal/></emphasis>/&gt;
&lt;aop:scoped-proxy proxy-target-class="false"<literal/>/&gt;
&lt;/bean&gt;
&lt;bean id="userManager" class="com.foo.UserManager"&gt;
@ -633,7 +633,7 @@ @@ -633,7 +633,7 @@
<programlisting language="java">
Scope threadScope = new SimpleThreadScope();
beanFactory.registerScope("<emphasis role="bold">thread</emphasis>", threadScope);</programlisting>
beanFactory.registerScope("thread", threadScope);</programlisting>
<para>You then create bean definitions that adhere to the scoping rules of
your custom <interfacename>Scope</interfacename>:</para>
@ -657,10 +657,10 @@ beanFactory.registerScope("<emphasis role="bold">thread</emphasis>", threadScope @@ -657,10 +657,10 @@ beanFactory.registerScope("<emphasis role="bold">thread</emphasis>", threadScope
&lt;bean class="org.springframework.beans.factory.config.CustomScopeConfigurer"&gt;
&lt;property name="scopes"&gt;
&lt;map&gt;<emphasis role="bold">
&lt;map&gt;
&lt;entry key="thread"&gt;
&lt;bean class="org.springframework.context.support.SimpleThreadScope"/&gt;
&lt;/entry&gt;</emphasis>
&lt;/entry&gt;
&lt;/map&gt;
&lt;/property&gt;
&lt;/bean&gt;

2
src/reference/docbook/beans.xml

@ -944,7 +944,7 @@ List userList service.getUsernameList(); @@ -944,7 +944,7 @@ List userList service.getUsernameList();
<xi:include href="beans-classpath-scanning.xml"
xmlns:xi="http://www.w3.org/2001/XInclude"/>
<xi:include href="beans-standard-annotations.xml"
xmlns:xi="http://www.w3.org/2001/XInclude"/>

7
src/reference/docbook/index.xml

@ -232,7 +232,7 @@ @@ -232,7 +232,7 @@
<para>This document is a reference guide to Spring Framework features.
If you have any requests, comments, or questions on this document,
please post them on the user mailing list or on the support forums at
<ulink url="http://forum.springsource.org/"></ulink>.<!--Missing link above. PDF shows it as http://forum.springsource.org/--></para>
<ulink url="http://forum.springsource.org/"></ulink>.<!-- Missing link above. PDF shows it as http://forum.springsource.org/ --></para>
</partintro>
<xi:include href="overview.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
@ -490,8 +490,6 @@ @@ -490,8 +490,6 @@
xmlns:xi="http://www.w3.org/2001/XInclude" />
</part>
<!-- back matter -->
<part id="spring-appendices">
<title>Appendices</title>
@ -511,8 +509,9 @@ @@ -511,8 +509,9 @@
<xi:include href="spring.tld.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
<!--
<xi:include href="spring-form.tld.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
-->
</part>
</book>

10
src/reference/docbook/jdbc.xml

@ -2600,6 +2600,7 @@ public class TitlesAfterDateStoredProcedure extends StoredProcedure { @@ -2600,6 +2600,7 @@ public class TitlesAfterDateStoredProcedure extends StoredProcedure {
of a <classname>DefaultLobHandler</classname>. You typically set this
value through dependency injection.<!--Rewording ok? (What does what through dependency injection?) TR: Revised.--></para>
<!--
<programlistingco>
<areaspec>
<area coords="8" id="jdbc.lobhandler.variableref" />
@ -2631,7 +2632,7 @@ clobReader.close();</programlisting> @@ -2631,7 +2632,7 @@ clobReader.close();</programlisting>
<calloutlist>
<callout arearefs="jdbc.lobhandler.variableref">
<para>Pass in the lobHandler that in this example is a plain
<classname>DefaultLobHandler</classname><!--*Here* where?(deleted *Here we*) I don't see this in example.Use the lobHandler to do what? TR: Revised.--></para>
<classname>DefaultLobHandler</classname></para>
</callout>
<callout arearefs="jdbc.lobhandler.setClob">
@ -2647,13 +2648,14 @@ clobReader.close();</programlisting> @@ -2647,13 +2648,14 @@ clobReader.close();</programlisting>
</callout>
</calloutlist>
</programlistingco>
-->
<para>Now it's time to read the LOB data from the database. Again, you
use a <code>JdbcTemplate</code> with the same instance variable
<code>l</code><code>obHandler </code>and a reference to a
<classname>DefaultLobHandler</classname>.</para>
<para><programlistingco>
<para><!--<programlistingco>
<areaspec>
<area coords="5" id="jdbc.lobhandler.getClob" />
@ -2681,10 +2683,10 @@ clobReader.close();</programlisting> @@ -2681,10 +2683,10 @@ clobReader.close();</programlisting>
<callout arearefs="jdbc.lobhandler.setBlob">
<para>Using the method <classname>getBlobAsBytes,</classname>
retrieve the contents of the BLOB.<!--MISSING THE NUMBER 2 IN SNIPPET ABOVE. ADD WHERE APPROPRIATE. TR: ?; OK AS IS.--></para>
retrieve the contents of the BLOB.</para>
</callout>
</calloutlist>
</programlistingco></para>
</programlistingco>--></para>
</section>
<section id="jdbc-in-clause">

21
src/reference/docbook/spring.tld.xml

@ -55,7 +55,7 @@ @@ -55,7 +55,7 @@
</para>
<table id="spring.tld.bind.table">
<title>Attributes</title>
<tgroup cols="3">
<tgroup cols="4">
<colspec align="center" colname="Attribute"/>
<colspec align="center" colname="Required"/>
<colspec align="center" colname="Runtime.Expression"/>
@ -119,6 +119,7 @@ @@ -119,6 +119,7 @@
</tgroup>
</table>
</section>
<section id="spring.tld.escapeBody">
<title>The <literal>escapeBody</literal> tag</title>
<para>
@ -128,7 +129,7 @@ @@ -128,7 +129,7 @@
</para>
<table id="spring.tld.escapeBody.table">
<title>Attributes</title>
<tgroup cols="3">
<tgroup cols="4">
<colspec align="center" colname="Attribute"/>
<colspec align="center" colname="Required"/>
<colspec align="center" colname="Runtime.Expression"/>
@ -185,7 +186,7 @@ @@ -185,7 +186,7 @@
</para>
<table id="spring.tld.hasBindErrors.table">
<title>Attributes</title>
<tgroup cols="3">
<tgroup cols="4">
<colspec align="center" colname="Attribute"/>
<colspec align="center" colname="Required"/>
<colspec align="center" colname="Runtime.Expression"/>
@ -242,7 +243,7 @@ @@ -242,7 +243,7 @@
</para>
<table id="spring.tld.htmlEscape.table">
<title>Attributes</title>
<tgroup cols="3">
<tgroup cols="4">
<colspec align="center" colname="Attribute"/>
<colspec align="center" colname="Required"/>
<colspec align="center" colname="Runtime.Expression"/>
@ -284,7 +285,7 @@ @@ -284,7 +285,7 @@
</para>
<table id="spring.tld.message.table">
<title>Attributes</title>
<tgroup cols="3">
<tgroup cols="4">
<colspec align="center" colname="Attribute"/>
<colspec align="center" colname="Required"/>
<colspec align="center" colname="Runtime.Expression"/>
@ -453,7 +454,7 @@ @@ -453,7 +454,7 @@
</para>
<table id="spring.tld.nestedPath.table">
<title>Attributes</title>
<tgroup cols="3">
<tgroup cols="4">
<colspec align="center" colname="Attribute"/>
<colspec align="center" colname="Required"/>
<colspec align="center" colname="Runtime.Expression"/>
@ -496,7 +497,7 @@ @@ -496,7 +497,7 @@
</para>
<table id="spring.tld.theme.table">
<title>Attributes</title>
<tgroup cols="3">
<tgroup cols="4">
<colspec align="center" colname="Attribute"/>
<colspec align="center" colname="Required"/>
<colspec align="center" colname="Runtime.Expression"/>
@ -662,7 +663,7 @@ @@ -662,7 +663,7 @@
</para>
<table id="spring.tld.transform.table">
<title>Attributes</title>
<tgroup cols="3">
<tgroup cols="4">
<colspec align="center" colname="Attribute"/>
<colspec align="center" colname="Required"/>
<colspec align="center" colname="Runtime.Expression"/>
@ -751,7 +752,7 @@ @@ -751,7 +752,7 @@
</para>
<table id="spring.tld.url.table">
<title>Attributes</title>
<tgroup cols="3">
<tgroup cols="4">
<colspec align="center" colname="Attribute"/>
<colspec align="center" colname="Required"/>
<colspec align="center" colname="Runtime.Expression"/>
@ -868,7 +869,7 @@ @@ -868,7 +869,7 @@
</para>
<table id="spring.tld.eval.table">
<title>Attributes</title>
<tgroup cols="3">
<tgroup cols="4">
<colspec align="center" colname="Attribute"/>
<colspec align="center" colname="Required"/>
<colspec align="center" colname="Runtime.Expression"/>

3
src/reference/docbook/swf-sidebar.xml

@ -1,8 +1,7 @@ @@ -1,8 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<sidebar xmlns="http://docbook.org/ns/docbook" version="5.0"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
xml:id="spring-web-flow-sidebar">
xmlns:xi="http://www.w3.org/2001/XInclude">
<title>Spring Web Flow</title>
<para>Spring Web Flow (SWF) aims to be the best solution for the management

3
src/reference/docbook/view.xml

@ -209,8 +209,7 @@ productList.url=/WEB-INF/jsp/productlist.jsp</programlisting> @@ -209,8 +209,7 @@ productList.url=/WEB-INF/jsp/productlist.jsp</programlisting>
best practice), then you can bind the form to the named variable like
so:</para>
<programlisting language="xml">&lt;form:form <lineannotation><emphasis
role="bold">commandName="user"</emphasis></lineannotation>&gt;
<programlisting language="xml">&lt;form:form commandName="user"&gt;
&lt;table&gt;
&lt;tr&gt;
&lt;td&gt;First Name:&lt;/td&gt;

Loading…
Cancel
Save