docbook-apps

  • 1.  Storing data within Docbook?

    Posted 11-19-2013 00:35
    I'm transforming some data from an XML format into a Docbook table - but not all of the data in the XML is to be displayed in Docbook. I would, however, like to store it in my Docbook XML - because future transformations would like to read my Docbook XML and they'd need all of the data that went into it. I'd rather not introduce a secondary file for storing the extra data - this would bring complications and fragility.

    I thought of adding extra columns in the Docbook table and setting them to be hidden - but it doesn't seem to be possible to 'hide' a column easily. Another idea would be to store in in XML comments - which would still be accessible in my transformation as well.

    What would be a good pattern to solve my use case?


    The information contained in this e-mail message and any accompanying files is or may be privileged or confidential. If you are not the intended recipient, any use, dissemination, reliance, forwarding, printing or copying of this e-mail or any attached files is unauthorised. This e-mail and any attachments may be subject to copyright. Copyright material should not be reproduced, adapted or communicated without the written consent of the copyright owner. If you have received this e-mail in error please advise the sender immediately by return e-mail or telephone and delete all copies. NEHTA does not make any representations or give any guarantees in respect of the accuracy or completeness of any information contained in this e-mail or attached files. Internet communications are not secure, therefore NEHTA does not accept any liability for the contents of this message or attached files.



  • 2.  Re: [docbook-apps] Storing data within Docbook?

    Posted 11-19-2013 09:01
    On 19/11/13 00:34, Vadim Peretokin wrote:
    > I'm transforming some data from an XML format into a Docbook table - but
    > not all of the data in the XML is to be displayed in Docbook. I would,
    > however, like to store it in my Docbook XML - because future
    > transformations would like to read my Docbook XML and they'd need /all/
    > of the data that went into it. I'd rather not introduce a secondary file
    > for storing the extra data - this would bring complications and fragility.
    >
    > I thought of adding extra columns in the Docbook table and setting them
    > to be hidden - but it doesn't seem to be possible to 'hide' a column
    > easily. Another idea would be to store in in XML comments - which would
    > still be accessible in my transformation as well.
    >


    *if* all your cells to be hidden are in the same column

    <entry role='hidden'> to contain the cells which you do not want
    to be shown?






    regards

    --
    Dave Pawson
    XSLT XSL-FO FAQ.
    http://www.dpawson.co.uk



  • 3.  Re: [docbook-apps] Storing data within Docbook?

    Posted 11-19-2013 14:13
    To extend Dave's idea, you may want to use profiling to filter the data
    that appears when you transform your docbook into something else:

    http://www.sagehill.net/docbookxsl/Profiling.html

    I don't think applying role=hidden automatically works, right?
    Wouldn't one need to create a preprocessing step or apply profiling
    for the role to operate to limit the data that appears?


    But the role attribute is available for you to apply your own meaning
    to, and you could use it on any element to organize your data such
    that you can display the desired information when transforming the
    docbook into ordinary outputs, and then still use the same original
    docbook file for input to some other downstream process.

    --Aaron



    On Tue, Nov 19, 2013 at 3:01 AM, davep <davep@dpawson.co.uk> wrote:

    > On 19/11/13 00:34, Vadim Peretokin wrote:
    >
    >> I'm transforming some data from an XML format into a Docbook table - but
    >> not all of the data in the XML is to be displayed in Docbook. I would,
    >> however, like to store it in my Docbook XML - because future
    >> transformations would like to read my Docbook XML and they'd need /all/
    >> of the data that went into it. I'd rather not introduce a secondary file
    >> for storing the extra data - this would bring complications and fragility.
    >>
    >> I thought of adding extra columns in the Docbook table and setting them
    >> to be hidden - but it doesn't seem to be possible to 'hide' a column
    >> easily. Another idea would be to store in in XML comments - which would
    >> still be accessible in my transformation as well.
    >>
    >>
    >
    > *if* all your cells to be hidden are in the same column
    >
    > <entry role='hidden'> to contain the cells which you do not want
    > to be shown?
    >
    >
    >
    >
    >
    >
    > regards
    >
    > --
    > Dave Pawson
    > XSLT XSL-FO FAQ.
    > http://www.dpawson.co.uk
    >
    > ---------------------------------------------------------------------
    > To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
    > For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
    >
    >


    --
    --------------------------------------
    Aaron DaMommio: Husband, father, writer, juggler, and expert washer of
    dishes.
    - My blog: http://aarondamommio.blogspot.com
    - Need a juggler? http://amazingaaronjuggler.blogspot.com/
    =======================================



  • 4.  Re: [docbook-apps] Storing data within Docbook?

    Posted 11-19-2013 13:20
    On 19.11.2013 1:34, Vadim Peretokin wrote:
    > I'm transforming some data from an XML format into a Docbook table - but not all of the data in the XML is to be displayed in Docbook. I would, however, like to store it in my Docbook XML - because future transformations would like to read my Docbook XML and they'd need all of the data that went into it. I'd rather not introduce a secondary file for storing the extra data - this would bring complications and fragility.

    The easiest way to do this is to add <info> element to the table and put
    you raw XML data there -- they just must be in different namespace then
    DocBook in order to validate.

    Jirka


    --
    ------------------------------------------------------------------
    Jirka Kosek e-mail: jirka@kosek.cz http://xmlguru.cz
    ------------------------------------------------------------------
    Professional XML consulting and training services
    DocBook customization, custom XSLT/XSL-FO document processing
    ------------------------------------------------------------------
    OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 rep.
    ------------------------------------------------------------------
    Bringing you XML Prague conference http://xmlprague.cz
    ------------------------------------------------------------------




  • 5.  Re: [docbook-apps] Storing data within Docbook?

    Posted 11-19-2013 13:51
    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA512

    Also you could consider using Processing Instructions (PI), which have
    the following syntax:



    This is a general-purpose mechanism for embedding metadata in an XML
    file. Sounds like it might be useful in this case (but you'll have to
    write your own tool or script to process the PI nodes).

    On 19/11/2013 14:19, Jirka Kosek wrote:
    > On 19.11.2013 1:34, Vadim Peretokin wrote:
    >> I'm transforming some data from an XML format into a Docbook
    >> table - but not all of the data in the XML is to be displayed in
    >> Docbook. I would, however, like to store it in my Docbook XML -
    >> because future transformations would like to read my Docbook XML
    >> and they'd need all of the data that went into it. I'd rather not
    >> introduce a secondary file for storing the extra data - this
    >> would bring complications and fragility.
    >
    > The easiest way to do this is to add <info> element to the table
    > and put you raw XML data there -- they just must be in different
    > namespace then DocBook in order to validate.
    >
    > Jirka
    >
    >

    - --
    Fintan Bolton

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG/MacGPG2 v2.0.19 (Darwin)
    Comment: GPGTools - http://gpgtools.org
    Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

    iQEcBAEBCgAGBQJSi2zPAAoJEPmghGy20TDthLwH/3JfXiC1sCso6aGG7XLwj38K
    TMeBTUUE6keiM4Q01FBaOb0cIbkVeklZh6OFbSUwjd1Dfy8W2mVhzL+Ql62zFJLq
    iWGt8RHL9rKTRhxetti757C2pe9CJ4j8TUYc5PqCGntSKIWqxrcOVCbjIZTiI3et
    pO1VEc22V06uuhMyk2tN9ZXX0MSDV4CmLYDKXOT+6Hpkzk+emujfYghUi+57AK/w
    R8VnU3Ei9SBCP4SOGK9kl5jnXKA29FK+8eZIeaNXTY6BEqM0BMnnPbK4VIk+gMvL
    rjidSEg4P8O3SxyN3TfKqo0F/qKCVsXVPKibFbYJqbOCiMYTzod+CP7HXim0cbs=
    =Sl4t
    -----END PGP SIGNATURE-----