OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] Storing data within Docbook?


It is that same approach though, 'I want to convert my source xml to some docbook format but hide some additional data within it.'.

On 21/11/13 03:05, Aaron DaMommio wrote:
Oh, wow, I didn't understand at first from what Jirka said, that the idea here was to put the full original xml data embedded in the <info> element, for downstream use. That's a neat trick. I was still thinking along the lines of 'I want to convert my source xml to some docbook format but hide some additional data within it.' Thanks for elaborating, David.

--Aaron


On Tue, Nov 19, 2013 at 6:53 PM, David Cramer <david@thingbag.net> wrote:
Jirka's suggestion is the best approach. It gives you all the flexiblity
in the world with no extra work. Here's how it might look:

...
          <tr>
            <td>
              <para>
                <info>
                <vadim:metadata xmlns:vadim="http://somedomain-you-own/some-namespace-you-makeup">
                  <vadim:somefield>somedata</vadim:somefield>
                </vadim:metadata>
                </info>
              Ipsum lorem. Stuff readers see goes here.
              </para>
            </td>
...

DocBook's info element and its contents are already ignored by the xslts.
You can encode your data in xml as complex as it needs to be in a namespace
of your invention. Here's another way of doing it if you don't like namespace prefixes:

          <tr>
            <td>
              <para>
                <info>
                <metadata xmlns="http://somedomain-you-own/some-namespace-you-makeup">
                  <somefield>somedata</somefield>
                </metadata>
                </info>
              Ipsum lorem. Stuff readers see goes here.
              </para>
            </td>

Regards,
David

On 11/19/2013 06:36 PM, Vadim Peretokin wrote:
> This sounds really interesting and viable, the second being the
> profiling of the role attribute (which I'd like to avoid if I can due to
> good advice given here
> <http://www.sagehill.net/docbookxsl/ProfilingWithRole.html>). However it
> seems the schema doesn't allow adding other elements, even from other
> namespaces? Adding an an <extradata:info> to a <row> (the ideal
> situation; easiest to deal with then when working with XSLT on it!)
> gives a validation error: E [Jing] element "extradata:info" not allowed
> here; expected element "entry" or "entrytbl"
>
> On 19/11/13 23: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
>>
>>
>
> --
>
> Vadim Peretokin
> Clinical Information Modeller
> *nehta - National E-Health Transition Authority*
> Level 2, 10 Browning St, West End, QLD 4101, Australia
> Phone: (0) 3023 8573
> Email: vadim.peretokin@nehta.gov.au <mailto:firstname.lastname@nehta.gov.au>
> Web: www.nehta.gov.au <http://www.nehta.gov.au>
>
>
>
> 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.


---------------------------------------------------------------------
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/
=======================================

--

Vadim Peretokin
Clinical Information Modeller
nehta - National E-Health Transition Authority
Level 2, 10 Browning St, West End, QLD 4101, Australia
Phone: (0) 3023 8573
Email: vadim.peretokin@nehta.gov.au
Web: www.nehta.gov.au



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.


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]