← Prev in month ← Prev in thread
Next in thread → Next in month →

Re: [docbook-apps] Exclude elements witout condition-attribute whenprofiling

From
Jirka Kosek <>
Date
2005-03-10T11:17:06+00:00
ID
Thread
Re: [docbook-apps] Exclude elements witout condition-attribute whenprofiling
Daniela Dänzer wrote:

> I want to profile my xml and take all elements where the attribute condition is set to map_dok but not those, who don't have an attribute "condition".
> How do I do this?
>  
> I tried with  "condition=map_dok;not('')", "condition=map_dok;not(null)" and "condition=map_dok", but no success so far. The elements which don't
> have the attribute "condition" are always selected. 
>  
> How do I exclude these from my profiled document?

Are you *really* sure that you want to do this? This will mean that each 
element that should go to the output must be labeled by profiling 
attribute. E.g.

<section condition="map_dok">
   <title condition="map_dok">...</title>

   <para condition="map_dok">...<emphasis 
condition="map_dok">...</emphasis>...</para>

   ...
</section>

If you really want to go this way, just add the following template into 
your customization layer:

<xsl:template match="*[not(@condition)]" mode="profile"/>

But you have been warned that most documents will be drastically pruned 
this way.				

-- 
------------------------------------------------------------------
   Jirka Kosek     e-mail:      http://www.kosek.cz
------------------------------------------------------------------
   Profesionální školení a poradenství v oblasti technologií XML.
      Podívejte se na náš nově spuštěný web http://DocBook.cz
        Podrobný přehled školení http://xmlguru.cz/skoleni/
------------------------------------------------------------------
← Prev in month ← Prev in thread
Next in thread → Next in month →