This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
AW: AW: [docbook-apps] Exclude elements witout condition-attribute when profiling
- From: Daniela Dänzer <d dot daenzer at adito dot de>
- To: "Jirka Kosek" <jirka at kosek dot cz>
- Cc: <docbook-apps at lists dot oasis-open dot org>
- Date: Thu, 10 Mar 2005 13:30:16 +0100
- Subject: AW: AW: [docbook-apps] Exclude elements witout condition-attribute when profiling
Okay, I think, I have your point now.
Perhaps, the best thing to do is to make a totally new styesheet which fits my needs.
Thanks a lot for your help!
Regards,
Daniela
-----Ursprüngliche Nachricht-----
Von: Jirka Kosek [mailto:jirka@kosek.cz]
Gesendet: Donnerstag, 10. März 2005 12:42
An: Daniela Dänzer
Cc: docbook-apps@lists.oasis-open.org
Betreff: Re: AW: [docbook-apps] Exclude elements witout condition-attribute when profiling
Daniela Dänzer wrote:
> Perhaps I did not make myself very clear.
>
> I have the following:
>
> <chapter>
> <title condition="map_dok">xxx</title>
> <para condition="map_dok">xxx</para>
> <para>x</para>
> <sect1>y</sect1>
> </chapter>
>
> And I am searching for a way to get only the two elements <title
> condition="map_dok">xxx</title> and <para
> condition="map_dok">xxx</para> in my profiled document and not the
> others. But when I do "condition=map_dok" I get all of the elements
> and not only those whose condition-attribute is set.
But what you will do with title and para without surrounding chapter (it
has not condition, so it should be stripped out according to your
request)? Or should the whole chapter be supressed because it has not
condition set?
You must keep in mind that after profiling you should get subset of
original document that is still valid according DocBook DTD. If this
validity is not maintained it is very probably that you will get
corrupted output from stylesheet.
Your requirements can very easily let to non-valid profiled document. I
think that you can still solve your requrements but you will have to
write custom XSLT transformation that will do some sort of more
intelligent profiling based on additional knowledge in stylesheets. For
example your modified profiling code can left unlabeled chapter element
in documet if it contains some labeled subelements. But something like
this can't be part of standard profiling because it depends on your very
special needs.
--
------------------------------------------------------------------
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/
------------------------------------------------------------------