ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* TEI to context XML mappings?
@ 2016-02-23 21:26 Mica Semrick
  2016-02-24  8:20 ` Hans Hagen
  0 siblings, 1 reply; 22+ messages in thread
From: Mica Semrick @ 2016-02-23 21:26 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 210 bytes --]

Reading the docbook thread earlier today reminded me to ask this: 

Is there any feature or script that anyone can share that will read in an XML document and spit out a blank mapping file?

Thanks!

-m

[-- Attachment #1.2: Type: text/html, Size: 238 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: TEI to context XML mappings?
  2016-02-23 21:26 TEI to context XML mappings? Mica Semrick
@ 2016-02-24  8:20 ` Hans Hagen
  2016-02-24  9:10   ` Pablo Rodriguez
  0 siblings, 1 reply; 22+ messages in thread
From: Hans Hagen @ 2016-02-24  8:20 UTC (permalink / raw)
  To: ntg-context

On 2/23/2016 10:26 PM, Mica Semrick wrote:
> Reading the docbook thread earlier today reminded me to ask this:
>
> Is there any feature or script that anyone can share that will read in
> an XML document and spit out a blank mapping file?

what is a blank mapping file


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
       tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: TEI to context XML mappings?
  2016-02-24  8:20 ` Hans Hagen
@ 2016-02-24  9:10   ` Pablo Rodriguez
  2016-02-24  9:52     ` Hans Hagen
                       ` (2 more replies)
  0 siblings, 3 replies; 22+ messages in thread
From: Pablo Rodriguez @ 2016-02-24  9:10 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 02/24/2016 09:20 AM, Hans Hagen wrote:
> On 2/23/2016 10:26 PM, Mica Semrick wrote:
>> Reading the docbook thread earlier today reminded me to ask this:
>>
>> Is there any feature or script that anyone can share that will read in
>> an XML document and spit out a blank mapping file?
> 
> what is a blank mapping file

Just guessing (or that would be useful for me too), a file with the
following scheme:

\startxmlsetups xml:blank:map % xml:[filename] would be also fine
    \xmlsetsetup{\xmldocument}
        {xml:elements} % all elements used in document listed here
        {xml:*}

    \xmlsetsetup{\xmldocument}
        {h2[contains(@class,'author')]} % list also all elements
        {xml:title:author}              % with attributes
\stopxmlsetups

\xmlregistersetup{xml:pandoc}

\startxmlsetups xml:elements % basic configuration for elements
\xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:title:author % basic configuration for attributes
    \xmlflush{#1}
\stopxmlsetups

I guess that the usefulness of this is not the actual configuration, but
to know what you have to configure.

I hope it helps,

Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: TEI to context XML mappings?
  2016-02-24  9:10   ` Pablo Rodriguez
@ 2016-02-24  9:52     ` Hans Hagen
  2016-02-24 10:11       ` Thomas A. Schmitz
                         ` (2 more replies)
  2016-06-22  5:12     ` Mica Semrick
  2016-08-14  5:03     ` Mica Semrick
  2 siblings, 3 replies; 22+ messages in thread
From: Hans Hagen @ 2016-02-24  9:52 UTC (permalink / raw)
  To: ntg-context

On 2/24/2016 10:10 AM, Pablo Rodriguez wrote:
> On 02/24/2016 09:20 AM, Hans Hagen wrote:
>> On 2/23/2016 10:26 PM, Mica Semrick wrote:
>>> Reading the docbook thread earlier today reminded me to ask this:
>>>
>>> Is there any feature or script that anyone can share that will read in
>>> an XML document and spit out a blank mapping file?
>>
>> what is a blank mapping file
>
> Just guessing (or that would be useful for me too), a file with the
> following scheme:
>
> \startxmlsetups xml:blank:map % xml:[filename] would be also fine
>      \xmlsetsetup{\xmldocument}
>          {xml:elements} % all elements used in document listed here
>          {xml:*}
>
>      \xmlsetsetup{\xmldocument}
>          {h2[contains(@class,'author')]} % list also all elements
>          {xml:title:author}              % with attributes
> \stopxmlsetups
>
> \xmlregistersetup{xml:pandoc}
>
> \startxmlsetups xml:elements % basic configuration for elements
> \xmlflush{#1}
> \stopxmlsetups
>
> \startxmlsetups xml:title:author % basic configuration for attributes
>      \xmlflush{#1}
> \stopxmlsetups
>
> I guess that the usefulness of this is not the actual configuration, but
> to know what you have to configure.

context --extra=xml --analyze yourfile.xml

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
       tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: TEI to context XML mappings?
  2016-02-24  9:52     ` Hans Hagen
@ 2016-02-24 10:11       ` Thomas A. Schmitz
  2016-02-24 10:26         ` Hans Hagen
  2016-02-24 10:32       ` Pablo Rodriguez
  2016-02-25  5:04       ` mica
  2 siblings, 1 reply; 22+ messages in thread
From: Thomas A. Schmitz @ 2016-02-24 10:11 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 02/24/2016 10:52 AM, Hans Hagen wrote:
>
> context --extra=xml --analyze yourfile.xml

Hmm, that sounds great, however, with the latest 'n greatest:

resolvers       > modules > 'xml-analyzers' is not found

Thomas
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: TEI to context XML mappings?
  2016-02-24 10:11       ` Thomas A. Schmitz
@ 2016-02-24 10:26         ` Hans Hagen
  2016-02-24 12:05           ` Thomas A. Schmitz
  2016-02-24 15:34           ` Mica Semrick
  0 siblings, 2 replies; 22+ messages in thread
From: Hans Hagen @ 2016-02-24 10:26 UTC (permalink / raw)
  To: ntg-context

On 2/24/2016 11:11 AM, Thomas A. Schmitz wrote:
> On 02/24/2016 10:52 AM, Hans Hagen wrote:
>>
>> context --extra=xml --analyze yourfile.xml
>
> Hmm, that sounds great, however, with the latest 'n greatest:
>
> resolvers       > modules > 'xml-analyzers' is not found

i added the files to the beta

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
       tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: TEI to context XML mappings?
  2016-02-24  9:52     ` Hans Hagen
  2016-02-24 10:11       ` Thomas A. Schmitz
@ 2016-02-24 10:32       ` Pablo Rodriguez
  2016-02-25  5:04       ` mica
  2 siblings, 0 replies; 22+ messages in thread
From: Pablo Rodriguez @ 2016-02-24 10:32 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 02/24/2016 10:52 AM, Hans Hagen wrote:
> On 2/24/2016 10:10 AM, Pablo Rodriguez wrote:
>> [...]
>> I guess that the usefulness of this is not the actual configuration, but
>> to know what you have to configure.
> 
> context --extra=xml --analyze yourfile.xml

That’s awesome. Many thanks, Hans.

(Not tested yet.)

Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: TEI to context XML mappings?
  2016-02-24 10:26         ` Hans Hagen
@ 2016-02-24 12:05           ` Thomas A. Schmitz
  2016-02-24 14:15             ` Hans Hagen
  2016-02-24 17:32             ` Mica Semrick
  2016-02-24 15:34           ` Mica Semrick
  1 sibling, 2 replies; 22+ messages in thread
From: Thomas A. Schmitz @ 2016-02-24 12:05 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 02/24/2016 11:26 AM, Hans Hagen wrote:
>
> i added the files to the beta

Great, it works now and is a fantastic tool! I was thinking of writing 
something similar myself, but of course, you had already anticipated 
this wish... I'll try to see if I can make sense of s-xml-analyzers.lua 
and come up with different visualizations (what I had in mind was a 
table listing the elements, all elements contained in them and all 
attributes used). I don't know if the "blank mapping file" as 
conjectured by Pablo is a useful idea, but I guess it would be trivial 
to implement that as well.

Thanks and all best

Thomas
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: TEI to context XML mappings?
  2016-02-24 12:05           ` Thomas A. Schmitz
@ 2016-02-24 14:15             ` Hans Hagen
  2016-02-24 14:32               ` Thomas A. Schmitz
  2016-02-24 17:32             ` Mica Semrick
  1 sibling, 1 reply; 22+ messages in thread
From: Hans Hagen @ 2016-02-24 14:15 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 2/24/2016 1:05 PM, Thomas A. Schmitz wrote:
> On 02/24/2016 11:26 AM, Hans Hagen wrote:
>>
>> i added the files to the beta
>
> Great, it works now and is a fantastic tool! I was thinking of writing
> something similar myself, but of course, you had already anticipated
> this wish... I'll try to see if I can make sense of s-xml-analyzers.lua
> and come up with different visualizations (what I had in mind was a
> table listing the elements, all elements contained in them and all
> attributes used). I don't know if the "blank mapping file" as
> conjectured by Pablo is a useful idea, but I guess it would be trivial
> to implement that as well.

if you need more info i can add it ... one can then generate whatever 
table one wants

elements in element .. one level i assume?

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
       tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: TEI to context XML mappings?
  2016-02-24 14:15             ` Hans Hagen
@ 2016-02-24 14:32               ` Thomas A. Schmitz
  2016-02-24 14:51                 ` Hans Hagen
  0 siblings, 1 reply; 22+ messages in thread
From: Thomas A. Schmitz @ 2016-02-24 14:32 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 02/24/2016 03:15 PM, Hans Hagen wrote:
>
> if you need more info i can add it ... one can then generate whatever
> table one wants
>
> elements in element .. one level i assume?

Yes, one level, otherwise things become too complex. And you're right, 
it's already there in the "children" element. My question was not so 
much about the information but about the visualization. Let's put it in 
a slightly different way: the context parser holds the information about 
my xml tree as a lua table, right? It would be handy to have a typeset 
version of this table, as a, well, table, so we could see how to access 
the different parts of it in lua and/or tex code. So I know that my 
element is e, I know that it has a table e.at that collects the 
different attributes in subtables of the form e.at["attribute"]. I 
assume there's also e.text, e.first etc. Would it be possible to typeset 
this information for elements.

Thomas
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: TEI to context XML mappings?
  2016-02-24 14:32               ` Thomas A. Schmitz
@ 2016-02-24 14:51                 ` Hans Hagen
  2016-02-24 15:57                   ` Thomas A. Schmitz
  0 siblings, 1 reply; 22+ messages in thread
From: Hans Hagen @ 2016-02-24 14:51 UTC (permalink / raw)
  To: ntg-context

On 2/24/2016 3:32 PM, Thomas A. Schmitz wrote:
> On 02/24/2016 03:15 PM, Hans Hagen wrote:
>>
>> if you need more info i can add it ... one can then generate whatever
>> table one wants
>>
>> elements in element .. one level i assume?
>
> Yes, one level, otherwise things become too complex. And you're right,
> it's already there in the "children" element. My question was not so
> much about the information but about the visualization. Let's put it in
> a slightly different way: the context parser holds the information about
> my xml tree as a lua table, right? It would be handy to have a typeset
> version of this table, as a, well, table, so we could see how to access
> the different parts of it in lua and/or tex code. So I know that my
> element is e, I know that it has a table e.at that collects the
> different attributes in subtables of the form e.at["attribute"]. I
> assume there's also e.text, e.first etc. Would it be possible to typeset
> this information for elements.

no, there are no such fields

\starttext

\startluacode
     local t = xml.load("t:/sources/i-en-xml.xml")
     print(table.serialize(t,true,{})) -- you need to call this way
\stopluacode

\stoptext

at : attributes
ns : namespace
rn : remapped namespace
tg : tag (@..@ names indicate special tags)
dt : text

text is a table of strings and elements

(there are a few extra private fields and when applying searched there 
are index fields added)

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
       tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: TEI to context XML mappings?
  2016-02-24 10:26         ` Hans Hagen
  2016-02-24 12:05           ` Thomas A. Schmitz
@ 2016-02-24 15:34           ` Mica Semrick
  1 sibling, 0 replies; 22+ messages in thread
From: Mica Semrick @ 2016-02-24 15:34 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1308 bytes --]

Thank you! And sorry for my poor description.

Best, 
Mica

On February 24, 2016 2:26:55 AM PST, Hans Hagen <pragma@wxs.nl> wrote:
>On 2/24/2016 11:11 AM, Thomas A. Schmitz wrote:
>> On 02/24/2016 10:52 AM, Hans Hagen wrote:
>>>
>>> context --extra=xml --analyze yourfile.xml
>>
>> Hmm, that sounds great, however, with the latest 'n greatest:
>>
>> resolvers       > modules > 'xml-analyzers' is not found
>
>i added the files to the beta
>
>-----------------------------------------------------------------
>                                           Hans Hagen | PRAGMA ADE
>               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>       tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl
>-----------------------------------------------------------------
>___________________________________________________________________________________
>If your question is of interest to others as well, please add an entry
>to the Wiki!
>
>maillist : ntg-context@ntg.nl /
>http://www.ntg.nl/mailman/listinfo/ntg-context
>webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
>archive  : http://foundry.supelec.fr/projects/contextrev/
>wiki     : http://contextgarden.net
>___________________________________________________________________________________

[-- Attachment #1.2: Type: text/html, Size: 1932 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: TEI to context XML mappings?
  2016-02-24 14:51                 ` Hans Hagen
@ 2016-02-24 15:57                   ` Thomas A. Schmitz
  0 siblings, 0 replies; 22+ messages in thread
From: Thomas A. Schmitz @ 2016-02-24 15:57 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 02/24/2016 03:51 PM, Hans Hagen wrote:
> no, there are no such fields
>
> \starttext
>
> \startluacode
>      local t = xml.load("t:/sources/i-en-xml.xml")
>      print(table.serialize(t,true,{})) -- you need to call this way
> \stopluacode
>
> \stoptext
>
> at : attributes
> ns : namespace
> rn : remapped namespace
> tg : tag (@..@ names indicate special tags)
> dt : text
>
> text is a table of strings and elements
>
> (there are a few extra private fields and when applying searched there
> are index fields added)

Ah wonderful, that's already very useful to have! Thanks for pointing it 
out!

Thomas
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: TEI to context XML mappings?
  2016-02-24 12:05           ` Thomas A. Schmitz
  2016-02-24 14:15             ` Hans Hagen
@ 2016-02-24 17:32             ` Mica Semrick
  1 sibling, 0 replies; 22+ messages in thread
From: Mica Semrick @ 2016-02-24 17:32 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1594 bytes --]

> I don't know if the "blank mapping file" as conjectured by Pablo is a useful idea

I find extremely useful. When I go to style some XML file, I don't have to type all of that stuff or study the XML file to find out what elements are contained. This feature will make it extremely easy to get something functional very quickly.

-m

On February 24, 2016 4:05:52 AM PST, "Thomas A. Schmitz" <thomas.schmitz@uni-bonn.de> wrote:
>On 02/24/2016 11:26 AM, Hans Hagen wrote:
>>
>> i added the files to the beta
>
>Great, it works now and is a fantastic tool! I was thinking of writing 
>something similar myself, but of course, you had already anticipated 
>this wish... I'll try to see if I can make sense of s-xml-analyzers.lua
>
>and come up with different visualizations (what I had in mind was a 
>table listing the elements, all elements contained in them and all 
>attributes used). I don't know if the "blank mapping file" as 
>conjectured by Pablo is a useful idea, but I guess it would be trivial 
>to implement that as well.
>
>Thanks and all best
>
>Thomas
>___________________________________________________________________________________
>If your question is of interest to others as well, please add an entry
>to the Wiki!
>
>maillist : ntg-context@ntg.nl /
>http://www.ntg.nl/mailman/listinfo/ntg-context
>webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
>archive  : http://foundry.supelec.fr/projects/contextrev/
>wiki     : http://contextgarden.net
>___________________________________________________________________________________

[-- Attachment #1.2: Type: text/html, Size: 2160 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: TEI to context XML mappings?
  2016-02-24  9:52     ` Hans Hagen
  2016-02-24 10:11       ` Thomas A. Schmitz
  2016-02-24 10:32       ` Pablo Rodriguez
@ 2016-02-25  5:04       ` mica
  2016-02-25  9:48         ` Hans Hagen
  2 siblings, 1 reply; 22+ messages in thread
From: mica @ 2016-02-25  5:04 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Hans Hagen

Hi Hans,

I've tried this feature on a very simple TEI XML document.

Issuing the command
context --extra=xml --analyze yourfile.xml
produces context-extra.pdf, which looks much like the file that Thomas 
wanted to produce. While this is helpful, I cannot figure out the 
command to produce the file that Pablo alluded to; any help would be 
great!

My context version is:
$ context --version

mtx-context     | ConTeXt Process Management 0.63
mtx-context     |
mtx-context     | main context file: 
/home/user/.context/tex/texmf-context/tex/context/base/mkiv/context.mkiv
mtx-context     | current version: 2016.02.24 11:19

Thank you!

-Mica

On 2016-02-24 01:52, Hans Hagen wrote:
> On 2/24/2016 10:10 AM, Pablo Rodriguez wrote:
>> On 02/24/2016 09:20 AM, Hans Hagen wrote:
>>> On 2/23/2016 10:26 PM, Mica Semrick wrote:
>>>> Reading the docbook thread earlier today reminded me to ask this:
>>>> 
>>>> Is there any feature or script that anyone can share that will read 
>>>> in
>>>> an XML document and spit out a blank mapping file?
>>> 
>>> what is a blank mapping file
>> 
>> Just guessing (or that would be useful for me too), a file with the
>> following scheme:
>> 
>> \startxmlsetups xml:blank:map % xml:[filename] would be also fine
>>      \xmlsetsetup{\xmldocument}
>>          {xml:elements} % all elements used in document listed here
>>          {xml:*}
>> 
>>      \xmlsetsetup{\xmldocument}
>>          {h2[contains(@class,'author')]} % list also all elements
>>          {xml:title:author}              % with attributes
>> \stopxmlsetups
>> 
>> \xmlregistersetup{xml:pandoc}
>> 
>> \startxmlsetups xml:elements % basic configuration for elements
>> \xmlflush{#1}
>> \stopxmlsetups
>> 
>> \startxmlsetups xml:title:author % basic configuration for attributes
>>      \xmlflush{#1}
>> \stopxmlsetups
>> 
>> I guess that the usefulness of this is not the actual configuration, 
>> but
>> to know what you have to configure.
> 
> context --extra=xml --analyze yourfile.xml
> 
> -----------------------------------------------------------------
>                                           Hans Hagen | PRAGMA ADE
>               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>       tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl
> -----------------------------------------------------------------
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry
> to the Wiki!
> 
> maillist : ntg-context@ntg.nl / 
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: TEI to context XML mappings?
  2016-02-25  5:04       ` mica
@ 2016-02-25  9:48         ` Hans Hagen
  2016-02-26  7:52           ` Pablo Rodriguez
  0 siblings, 1 reply; 22+ messages in thread
From: Hans Hagen @ 2016-02-25  9:48 UTC (permalink / raw)
  To: mica, mailing list for ConTeXt users

On 2/25/2016 6:04 AM, mica@silentumbrella.com wrote:
> Hi Hans,
>
> I've tried this feature on a very simple TEI XML document.
>
> Issuing the command
> context --extra=xml --analyze yourfile.xml
> produces context-extra.pdf, which looks much like the file that Thomas
> wanted to produce. While this is helpful, I cannot figure out the
> command to produce the file that Pablo alluded to; any help would be great!
>
> My context version is:
> $ context --version
>
> mtx-context     | ConTeXt Process Management 0.63
> mtx-context     |
> mtx-context     | main context file:
> /home/user/.context/tex/texmf-context/tex/context/base/mkiv/context.mkiv
> mtx-context     | current version: 2016.02.24 11:19
>
> Thank you!
>
> -Mica
>
> On 2016-02-24 01:52, Hans Hagen wrote:
>> On 2/24/2016 10:10 AM, Pablo Rodriguez wrote:
>>> On 02/24/2016 09:20 AM, Hans Hagen wrote:
>>>> On 2/23/2016 10:26 PM, Mica Semrick wrote:
>>>>> Reading the docbook thread earlier today reminded me to ask this:
>>>>>
>>>>> Is there any feature or script that anyone can share that will read in
>>>>> an XML document and spit out a blank mapping file?
>>>>
>>>> what is a blank mapping file
>>>
>>> Just guessing (or that would be useful for me too), a file with the
>>> following scheme:

i'm still puzzled what you want

>>> \startxmlsetups xml:blank:map % xml:[filename] would be also fine
>>>      \xmlsetsetup{\xmldocument}
>>>          {xml:elements} % all elements used in document listed here
>>>          {xml:*}

you can use

      \xmlsetsetup{#1}

there which is more neutral unless you target a specific xml tree

      \xmlsetsetup{#1}{*}{+} % shows
      \xmlsetsetup{#1}{*}{-} % hides

>>>      \xmlsetsetup{\xmldocument}
>>>          {h2[contains(@class,'author')]} % list also all elements
>>>          {xml:title:author}              % with attributes
>>> \stopxmlsetups
>>>
>>> \xmlregistersetup{xml:pandoc}
>>>
>>> \startxmlsetups xml:elements % basic configuration for elements
>>> \xmlflush{#1}
>>> \stopxmlsetups
>>>
>>> \startxmlsetups xml:title:author % basic configuration for attributes
>>>      \xmlflush{#1}
>>> \stopxmlsetups
>>>
>>> I guess that the usefulness of this is not the actual configuration, but
>>> to know what you have to configure.

\starttext
     \startbuffer[bar]
     <x>foo
         <y class='author1'>one</y>
         <y class='author2'>two</y>
     </x>
     \stopbuffer

     \startxmlsetups whatever
          \xmlsetsetup{#1}{x}{+}
          \xmlsetsetup{#1}{y}{-}
          \xmlsetsetup{#1}{y[contains(@class,'author2')]}{+}
     \stopxmlsetups
     \xmlregistersetup{whatever}
     \xmlprocessbuffer{foo}{bar}{}
\stoptext

i think what you want really depends on your expected input

>> context --extra=xml --analyze yourfile.xml
>>
>> -----------------------------------------------------------------
>>                                           Hans Hagen | PRAGMA ADE
>>               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>>       tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl
>> -----------------------------------------------------------------
>> ___________________________________________________________________________________
>>
>> If your question is of interest to others as well, please add an entry
>> to the Wiki!
>>
>> maillist : ntg-context@ntg.nl /
>> http://www.ntg.nl/mailman/listinfo/ntg-context
>> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
>> archive  : http://foundry.supelec.fr/projects/contextrev/
>> wiki     : http://contextgarden.net
>> ___________________________________________________________________________________
>>
>


-- 

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
       tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: TEI to context XML mappings?
  2016-02-25  9:48         ` Hans Hagen
@ 2016-02-26  7:52           ` Pablo Rodriguez
  2016-02-26  9:00             ` Hans Hagen
  0 siblings, 1 reply; 22+ messages in thread
From: Pablo Rodriguez @ 2016-02-26  7:52 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 02/25/2016 10:48 AM, Hans Hagen wrote:
> [...]
> i'm still puzzled what you want

Hans,

I’m only guessing (after testing the XML analyzing ability that you
discovered us with a single XML file).

The analysis is important, but after that I have to write the actual
environment.

I think that the basic structure that I sent in
https://mailman.ntg.nl/pipermail/ntg-context/2016/084582.html is useful
to avoid writing myself the environment.

I mean, of course I have to add the relevant commands to handle in
ConTeXt each element. But with the basic scheme, I know which elements
(in the broadest sense) I have to setup.

I want to avoid writing the whole element list in the environment by
hand. But I may be doing wrong (this is totally new to me).

Or do you write (type) each environment from scratch after using the
report generated by ConTeXt?

Many thanks for your help,

Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: TEI to context XML mappings?
  2016-02-26  7:52           ` Pablo Rodriguez
@ 2016-02-26  9:00             ` Hans Hagen
  2016-02-26 15:39               ` Mica Semrick
  0 siblings, 1 reply; 22+ messages in thread
From: Hans Hagen @ 2016-02-26  9:00 UTC (permalink / raw)
  To: ntg-context

On 2/26/2016 8:52 AM, Pablo Rodriguez wrote:
> On 02/25/2016 10:48 AM, Hans Hagen wrote:
>> [...]
>> i'm still puzzled what you want
>
> Hans,
>
> I’m only guessing (after testing the XML analyzing ability that you
> discovered us with a single XML file).
>
> The analysis is important, but after that I have to write the actual
> environment.
>
> I think that the basic structure that I sent in
> https://mailman.ntg.nl/pipermail/ntg-context/2016/084582.html is useful
> to avoid writing myself the environment.

You want to autogenerate that? That could become quite huge (And 
probably most would be discarded later anyway of you want all 
permutations of elements and attributes)

> I mean, of course I have to add the relevant commands to handle in
> ConTeXt each element. But with the basic scheme, I know which elements
> (in the broadest sense) I have to setup.
>
> I want to avoid writing the whole element list in the environment by
> hand. But I may be doing wrong (this is totally new to me).
>
> Or do you write (type) each environment from scratch after using the
> report generated by ConTeXt?

We just start with the trivial things and then look at the specific 
structures. We get either relative simple html like xml or we get quite 
complex educational markup, with quite demanding rendering and multiple 
products. The good news is that the number of elements is always limited 
(analyzing would not really work well because it can be that thousands 
of files need to be loaded and merged which itself is not a problem, but 
one then always need to interpret what needs to get loaded).

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
       tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: TEI to context XML mappings?
  2016-02-26  9:00             ` Hans Hagen
@ 2016-02-26 15:39               ` Mica Semrick
  0 siblings, 0 replies; 22+ messages in thread
From: Mica Semrick @ 2016-02-26 15:39 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 2859 bytes --]

> You want to autogenerate that? That could become quite huge (And 
> probably most would be discarded later anyway of you want all 
> permutations of elements and attributes)

Just elements would work for me.

Best,
M

On February 26, 2016 1:00:03 AM PST, Hans Hagen <pragma@wxs.nl> wrote:
>On 2/26/2016 8:52 AM, Pablo Rodriguez wrote:
>> On 02/25/2016 10:48 AM, Hans Hagen wrote:
>>> [...]
>>> i'm still puzzled what you want
>>
>> Hans,
>>
>> I’m only guessing (after testing the XML analyzing ability that you
>> discovered us with a single XML file).
>>
>> The analysis is important, but after that I have to write the actual
>> environment.
>>
>> I think that the basic structure that I sent in
>> https://mailman.ntg.nl/pipermail/ntg-context/2016/084582.html is
>useful
>> to avoid writing myself the environment.
>
>You want to autogenerate that? That could become quite huge (And 
>probably most would be discarded later anyway of you want all 
>permutations of elements and attributes)
>
>> I mean, of course I have to add the relevant commands to handle in
>> ConTeXt each element. But with the basic scheme, I know which
>elements
>> (in the broadest sense) I have to setup.
>>
>> I want to avoid writing the whole element list in the environment by
>> hand. But I may be doing wrong (this is totally new to me).
>>
>> Or do you write (type) each environment from scratch after using the
>> report generated by ConTeXt?
>
>We just start with the trivial things and then look at the specific 
>structures. We get either relative simple html like xml or we get quite
>
>complex educational markup, with quite demanding rendering and multiple
>
>products. The good news is that the number of elements is always
>limited 
>(analyzing would not really work well because it can be that thousands 
>of files need to be loaded and merged which itself is not a problem,
>but 
>one then always need to interpret what needs to get loaded).
>
>Hans
>
>-----------------------------------------------------------------
>                                           Hans Hagen | PRAGMA ADE
>               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>       tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl
>-----------------------------------------------------------------
>___________________________________________________________________________________
>If your question is of interest to others as well, please add an entry
>to the Wiki!
>
>maillist : ntg-context@ntg.nl /
>http://www.ntg.nl/mailman/listinfo/ntg-context
>webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
>archive  : http://foundry.supelec.fr/projects/contextrev/
>wiki     : http://contextgarden.net
>___________________________________________________________________________________

[-- Attachment #1.2: Type: text/html, Size: 3772 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: TEI to context XML mappings?
  2016-02-24  9:10   ` Pablo Rodriguez
  2016-02-24  9:52     ` Hans Hagen
@ 2016-06-22  5:12     ` Mica Semrick
  2016-08-14  5:03     ` Mica Semrick
  2 siblings, 0 replies; 22+ messages in thread
From: Mica Semrick @ 2016-06-22  5:12 UTC (permalink / raw)
  To: ntg-context

After doing some research, I stumbled upon saxon-lint 
(https://github.com/sputnick-dev/saxon-lint), a perl program
capable of using xpath3 expressions.

In the crudest form possible:

!# /bin/bash
for ELM in `saxon-lint.pl --xpath "distinct-values(//*/name())" file.xml`
do
echo -e "\\startxmlsetups xml:$ELM \n\t \\xmlflush{#1} \n \\stopxmlsetups"
done

I still need to write $ELM into an array to make it do the following:

\startxmlsetups xml:blank:map % xml:[filename] would be also fine
     \xmlsetsetup{\xmldocument}
         {xml:elements:from:the:variable:elm} % list the results from 
saxon-lint
         {xml:*}
\stopxmlsetups

That would give me the "blank" mapping file I want, saving me the
trouble of typing out the whole thing every time.

Best,
Mica

On 02/24/2016 01:10 AM, Pablo Rodriguez wrote:
> On 02/24/2016 09:20 AM, Hans Hagen wrote:
>> On 2/23/2016 10:26 PM, Mica Semrick wrote:
>>> Reading the docbook thread earlier today reminded me to ask this:
>>>
>>> Is there any feature or script that anyone can share that will read in
>>> an XML document and spit out a blank mapping file?
>>
>> what is a blank mapping file
>
> Just guessing (or that would be useful for me too), a file with the
> following scheme:
>
> \startxmlsetups xml:blank:map % xml:[filename] would be also fine
>     \xmlsetsetup{\xmldocument}
>         {xml:elements} % all elements used in document listed here
>         {xml:*}
>
>     \xmlsetsetup{\xmldocument}
>         {h2[contains(@class,'author')]} % list also all elements
>         {xml:title:author}              % with attributes
> \stopxmlsetups
>
> \xmlregistersetup{xml:pandoc}
>
> \startxmlsetups xml:elements % basic configuration for elements
> \xmlflush{#1}
> \stopxmlsetups
>
> \startxmlsetups xml:title:author % basic configuration for attributes
>     \xmlflush{#1}
> \stopxmlsetups
>
> I guess that the usefulness of this is not the actual configuration, but
> to know what you have to configure.
>
> I hope it helps,
>
> Pablo
>
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: TEI to context XML mappings?
  2016-02-24  9:10   ` Pablo Rodriguez
  2016-02-24  9:52     ` Hans Hagen
  2016-06-22  5:12     ` Mica Semrick
@ 2016-08-14  5:03     ` Mica Semrick
  2016-08-14 13:38       ` Hans Hagen
  2 siblings, 1 reply; 22+ messages in thread
From: Mica Semrick @ 2016-08-14  5:03 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 2007 bytes --]


After doing some research, I stumbled upon saxon-lint (https://github.com/sputnick-dev/saxon-lint), a perl program
capable of using xpath3 expressions.

In the crudest form possible:

!# /bin/bash
for ELM in `saxon-lint.pl --xpath "distinct-values(//*/name())" file.xml`
do
 		echo -e "\\startxmlsetups xml:$ELM \n\t \\xmlflush{#1} \n \\stopxmlsetups"
done

I still need to write $ELM into an array to make it do the following:

\startxmlsetups xml:blank:map % xml:[filename] would be also fine
    \xmlsetsetup{\xmldocument}
        {xml:elements:from:the:variable:elm} % list the results from  saxon-lint
        {xml:*}
\stopxmlsetups

That would give me the "blank" mapping file I want, saving me the
trouble of typing out the whole thing every time.

Best,
Mica

Pablo Rodriguez <oinos@gmx.es> @ 2016-02-24 01:10 PST:

> On 02/24/2016 09:20 AM, Hans Hagen wrote:
>> On 2/23/2016 10:26 PM, Mica Semrick wrote:
>>> Reading the docbook thread earlier today reminded me to ask this:
>>>
>>> Is there any feature or script that anyone can share that will read in
>>> an XML document and spit out a blank mapping file?
>>
>> what is a blank mapping file
>
> Just guessing (or that would be useful for me too), a file with the
> following scheme:
>
> \startxmlsetups xml:blank:map % xml:[filename] would be also fine
>     \xmlsetsetup{\xmldocument}
>         {xml:elements} % all elements used in document listed here
>         {xml:*}
>
>     \xmlsetsetup{\xmldocument}
>         {h2[contains(@class,'author')]} % list also all elements
>         {xml:title:author}              % with attributes
> \stopxmlsetups
>
> \xmlregistersetup{xml:pandoc}
>
> \startxmlsetups xml:elements % basic configuration for elements
> \xmlflush{#1}
> \stopxmlsetups
>
> \startxmlsetups xml:title:author % basic configuration for attributes
>     \xmlflush{#1}
> \stopxmlsetups
>
> I guess that the usefulness of this is not the actual configuration, but
> to know what you have to configure.
>
> I hope it helps,
>
> Pablo

[-- Attachment #1.2: Type: text/html, Size: 2554 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: TEI to context XML mappings?
  2016-08-14  5:03     ` Mica Semrick
@ 2016-08-14 13:38       ` Hans Hagen
  0 siblings, 0 replies; 22+ messages in thread
From: Hans Hagen @ 2016-08-14 13:38 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 8/14/2016 7:03 AM, Mica Semrick wrote:
>
> After doing some research, I stumbled upon saxon-lint
> (https://github.com/sputnick-dev/saxon-lint), a perl program
> capable of using xpath3 expressions.
>
> In the crudest form possible:
>
> !# /bin/bash
> for ELM in `saxon-lint.pl <http://saxon-lint.pl> --xpath
> "distinct-values(//*/name())" file.xml`
> do
> echo -e "\\startxmlsetups xml:$ELM \n\t \\xmlflush{#1} \n \\stopxmlsetups"
> done
>
> I still need to write $ELM into an array to make it do the following:
>
> \startxmlsetups xml:blank:map % xml:[filename] would be also fine
> \xmlsetsetup{\xmldocument}
> {xml:elements:from:the:variable:elm} % list the results from saxon-lint
> {xml:*}
> \stopxmlsetups
>
> That would give me the "blank" mapping file I want, saving me the
> trouble of typing out the whole thing every time.

we already have an analyzer:

context --extra=xml --analyze --autopdf music-collection.xml

i'll add a --template option for generating a bunch of setups (not the 
most efficient way to define a mapping but anyway)

context --extra=xml --analyze --template --autopdf music-collection.xml

> Best,
> Mica
>
> Pablo Rodriguez <oinos@gmx.es> @ 2016-02-24 01:10 PST:
>
>> On 02/24/2016 09:20 AM, Hans Hagen wrote:
>>> On 2/23/2016 10:26 PM, Mica Semrick wrote:
>>>> Reading the docbook thread earlier today reminded me to ask this:
>>>>
>>>> Is there any feature or script that anyone can share that will read in
>>>> an XML document and spit out a blank mapping file?
>>>
>>> what is a blank mapping file
>>
>> Just guessing (or that would be useful for me too), a file with the
>> following scheme:
>>
>> \startxmlsetups xml:blank:map % xml:[filename] would be also fine
>> \xmlsetsetup{\xmldocument}
>> {xml:elements} % all elements used in document listed here
>> {xml:*}
>>
>> \xmlsetsetup{\xmldocument}
>> {h2[contains(@class,'author')]} % list also all elements
>> {xml:title:author} % with attributes
>> \stopxmlsetups
>>
>> \xmlregistersetup{xml:pandoc}
>>
>> \startxmlsetups xml:elements % basic configuration for elements
>> \xmlflush{#1}
>> \stopxmlsetups
>>
>> \startxmlsetups xml:title:author % basic configuration for attributes
>> \xmlflush{#1}
>> \stopxmlsetups
>>
>> I guess that the usefulness of this is not the actual configuration, but
>> to know what you have to configure.
>>
>> I hope it helps,
>>
>> Pablo
>
>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
>
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________
>


-- 

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2016-08-14 13:38 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-23 21:26 TEI to context XML mappings? Mica Semrick
2016-02-24  8:20 ` Hans Hagen
2016-02-24  9:10   ` Pablo Rodriguez
2016-02-24  9:52     ` Hans Hagen
2016-02-24 10:11       ` Thomas A. Schmitz
2016-02-24 10:26         ` Hans Hagen
2016-02-24 12:05           ` Thomas A. Schmitz
2016-02-24 14:15             ` Hans Hagen
2016-02-24 14:32               ` Thomas A. Schmitz
2016-02-24 14:51                 ` Hans Hagen
2016-02-24 15:57                   ` Thomas A. Schmitz
2016-02-24 17:32             ` Mica Semrick
2016-02-24 15:34           ` Mica Semrick
2016-02-24 10:32       ` Pablo Rodriguez
2016-02-25  5:04       ` mica
2016-02-25  9:48         ` Hans Hagen
2016-02-26  7:52           ` Pablo Rodriguez
2016-02-26  9:00             ` Hans Hagen
2016-02-26 15:39               ` Mica Semrick
2016-06-22  5:12     ` Mica Semrick
2016-08-14  5:03     ` Mica Semrick
2016-08-14 13:38       ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).