OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] xinclude conditionally


Hi Bob,

we are doing a preprocessing step -indeed-, but exactly the other way 
round: first resolving XIncludes by xmllint and than using Xalan for the 
rest. So my question was completely superfluous :-/

Making two preprocessing steps could help, but what happens with nested 
XIncludes? I think best is to stick to standard profiling ...

Thanks,
Georges

Bob Stayton wrote:

>Hi Georges,
>The stylesheet never sees the xi:include element.  An XInclude-aware parser
>replaces the xi:include element with its content before handing it off to
>the stylesheet processor.  So the condition attribute would be lost before
>the DocBook XSL stylesheet has a chance to act on it.
>
>However, you could do it by preprocessing with an extra profiling step that
>has XInclude processing turned off.  The DocBook stylesheet
>profiling/profile.xsl acts on *any* element with the profiling attributes,
>so it should apply to the xi:include element as well.  Of course, since
>XInclude processing is turned off, any profiling attributes in the XIncludes
>would still need to be processed after the XIncludes are resolved.
>
>Bob Stayton
>Sagehill Enterprises
>DocBook Consulting
>bobs@sagehill.net
>
>
>----- Original Message ----- 
>From: "Georges Schmitz" <georges.schmitz@arcor.de>
>To: "docbook-apps" <docbook-apps@lists.oasis-open.org>
>Sent: Monday, November 28, 2005 2:40 AM
>Subject: [docbook-apps] xinclude conditionally
>
>
>  
>
>>what is the best way to conditionally include xml documents by using
>>Xinclude. We have in DocBook a standard attribute called "condition" and
>>I would like to use it directly in <xi:include> (see below). Or have I
>>to set the attribute necessarily in the root element of the included
>>document?
>>
>>
>>My wish:
>>
>>  <xi:include
>>    xmlns:xi="http://www.w3.org/2003/XInclude";
>>    href="art-tutorial.xml"
>>    parse="xml"
>>    condition="tutorial"
>>    >
>>    <xi:fallback>
>>      <para>
>>        <emphasis role="bold">FIXME: missing xinclude content
>>(metadata)</emphasis>
>>      </para>
>>    </xi:fallback>
>>  </xi:include>
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
>>For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
>>
>>
>>
>>    
>>
>
>
>
>  
>




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]