This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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: jirka@kosek.cz     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/
------------------------------------------------------------------

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]