docbook-apps

  • 1.  profiling=hiding?

    Posted 05-24-2007 00:22
    Hi,

    I'm using:
    * Saxon 6.5.5
    * Xerces 2.8.0
    * Apache FOP 0.20.5

    Context:
    I just want to confirm that my experience of profiling is correct,
    because it contradicts the description of profiling in the chapter in
    Bob Stayton's book. My task is to try to control what goes in the PDF.

    My Results:
    -- Any element with attribute condition="anyvalue" gets hidden and
    doesn't show up in the PDF. So, the attribute is removing the element
    from the output instead of putting the element into the output. That
    seems to be the opposite of how profiling is described in the book.
    -- It doesn't matter what I set profile.condition to when I process the
    guide. Any value causes any element with a condition attribute to be
    hidden from the PDF.

    Does this sound right? It seems to work consistently, but it just
    doesn't work like I thought it would.

    Thanks so much for any thoughts you have!!
    cheri

    --
    Cheri Dennison / Technical Writer
    AWS Platform Group
    cherid@amazon.com



  • 2.  Re: [docbook-apps] profiling=hiding?

    Posted 05-24-2007 01:09
    How are you doing the profiling, Cheri?

    You need to set the condition to what you want to show up -- any other
    setting for that condition (including no setting at all) makes it
    disappear during the profiling phase.

    For example, if you have the following code:
    <sect1 condition="internal">

    ...
    </sect1>

    Then setting condition to "internal" will keep it in the document;
    setting it to "external", "fred", or anything else will exclude it
    from the document. Don't forget to process the profiled version using
    either Single-pass or Two-pass processing.

    Ken

    On 5/23/07, Dennison, Cheri <cherid@amazon.com> wrote:
    > Hi,
    >
    > I'm using:
    > * Saxon 6.5.5
    > * Xerces 2.8.0
    > * Apache FOP 0.20.5
    >
    > Context:
    > I just want to confirm that my experience of profiling is correct,
    > because it contradicts the description of profiling in the chapter in
    > Bob Stayton's book. My task is to try to control what goes in the PDF.
    >
    > My Results:
    > -- Any element with attribute condition="anyvalue" gets hidden and
    > doesn't show up in the PDF. So, the attribute is removing the element
    > from the output instead of putting the element into the output. That
    > seems to be the opposite of how profiling is described in the book.
    > -- It doesn't matter what I set profile.condition to when I process the
    > guide. Any value causes any element with a condition attribute to be
    > hidden from the PDF.
    >
    > Does this sound right? It seems to work consistently, but it just
    > doesn't work like I thought it would.
    >
    > Thanks so much for any thoughts you have!!
    > cheri
    >
    > --
    > Cheri Dennison / Technical Writer
    > AWS Platform Group
    > cherid@amazon.com
    >
    > ---------------------------------------------------------------------
    > To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
    > For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
    >
    >



  • 3.  RE: [docbook-apps] profiling=hiding?

    Posted 05-24-2007 07:45
    Hi.

    You a wrong about "no setting at all" elements disappearing in target document.

    If element's profiling attribute is not set, it will show up.
    And if $profile.condition or other profiling variable is not set, elements will not be filtered.




  • 4.  Re: [docbook-apps] profiling=hiding?

    Posted 05-24-2007 11:30
    Hi Dmitry,

    Actually, if an empty string is used, the profiled section will
    disappear. For example:

    xsltproc --stringparam profile.condition '' --output output.xml
    profiling/profile.xsl input.xml

    You're right about not setting profile.condition at all though; in
    that case the profiled section remains.

    Ken

    On 5/24/07, Dmitry Mukhin <dmitry.mukhin@softjoys.com> wrote:
    > Hi.
    >
    > You a wrong about "no setting at all" elements disappearing in target document.
    >
    > If element's profiling attribute is not set, it will show up.
    > And if $profile.condition or other profiling variable is not set, elements will not be filtered.



  • 5.  RE: [docbook-apps] profiling=hiding?

    Posted 05-24-2007 12:16
    Hi Ken,

    Just wanted to clarify.
    "No setting at all" I understand as "is not set", but not "set to empty string".
    So your first message confused me.

    Thanks.




  • 6.  RE: [docbook-apps] profiling=hiding?

    Posted 05-24-2007 17:23

    1. I'm assigning condition="pdf" to elements I want to appear in the
    PDF.

    2. I've got an ant script that does two-pass processing, first
    processing the incoming XML with profile.xsl and then processing that
    output with my customized stylesheet. The part that processes the
    incoming XML includes this line to specify the profiling condition:
    <arg value="profile.condition='pdf'"></arg>.


    Below is the original XML corresponding to the attached PDF files
    showing the results.



    "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" []>

    <chapter id="Introduction" role="topic">

    <para condition="pdf">This para has condition="pdf" assigned to
    it.</para>
    <para>This para has no condition attribute at all.</para>



    <para>This section has condition="pdf" assigned
    to it.</para>




    <para>This section has no condition attribute at
    all.</para>

    </chapter>


    If I turn off profiling, I get the results in no_profiling.pdf as
    expected.

    When I turn on profiling, everything tagged with condition="pdf"
    disappears, as shown in with_profiling.pdf.

    When I change the arg statment in the ant script to say:
    <arg value="profile.condition='blah'"></arg>
    I get the exact same results as in with_profiling.pdf.
    So, it doesn't seem to matter what value I use for profile.condition.
    Anything with a condition attribute disappears.


    This seems backwards. What am I missing here?

    thanks!!
    cheri

    Attachment(s)

    pdf
    with_profiling.pdf   75 KB 1 version
    pdf
    no_profiling.pdf   77 KB 1 version