[publican-list] Conditionals not working when using xi:include over HTTP

Jeffrey Fearn jfearn at redhat.com
Tue Nov 2 05:51:53 UTC 2010


David Jorm wrote:
> I have a book which is using xi:include to include a section over HTTP:
> 
> <xi:include href="http://server.example.com/Documentation_Suite.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
> 
> This included section includes conditionals, for example:
> 
> 		<listitem>
> 			<para>
> 				<citetitle>Red Hat Enterprise Virtualization Security Guide</citetitle><phrase condition="Security_Guide"> (the book you are reading)</phrase> describes security concepts, features and best practices surrounding Red Hat Enterprise Virtualization. 
> 			</para>
> 		</listitem>
> 
> The appropriate condition is defined in publican.cfg. When I build the book, the conditional text is displayed no matter what the condition is set to publican.cfg. If i make the section a local file, and include it locally:
> 
> <xi:include href="Documentation_Suite.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
> 
> The conditionals work successfully.
> 
> Any ideas?

Conditions are parsed by publican before the XSLT is run, but the file 
is fetched by XSLT, so it's too late for the condition logic to be applied.

Cheers, Jeff.

-- 
Jeff Fearn <jfearn at redhat.com>
Software Engineer
Engineering Operations
Red Hat, Inc
Freedom ... courage ... Commitment ... ACCOUNTABILITY




More information about the publican-list mailing list