[NTG-context] XML ConTeXt

Daniel Grycman daniel.grycman at rub.de
Tue Nov 2 20:50:18 CET 2010


Hello list,

I'm working with XML in ConTeXt. Now I want parse a XML-File with the
following structure, which is an export from a database.

<?xml version="1.0" encoding="UTF-8"?>
<personal>
    <person>
        <Name></Name>
        <Vorname></Vorname>
        <Titel></Titel>
        <Bezeichnung></Bezeichnung>
        <Mail></Mail>
        <Raum></Raum>
        <Telefon></Telefon>
    </person>


I'm using this ConTeXt script.

\setuppapersize [A4,landscape][A4,landscape]
\usemodule [simplefonts]
\setmainfont[rubscalatz]
\setsansfont[rubflama]
\startxmlsetups xml:personen:base % associate setups with elements
\xmlsetsetup{personen}{personal|person}{xml:personen:*}
\stopxmlsetups
\xmlregisterdocumentsetup{personen}{xml:personen:base}

\startxmlsetups xml:personen:personal
\title{Personalverzeichnis}
\placelist[chapter]
\page
\xmlflush{#1} 
\stopxmlsetups

\startxmlsetups xml:personen:personal:person % associate setups with
elements
\bTABLE
\bTR \bTD {/Name} \eTD \eTR
\eTABLE
\stopxmlsetups

\starttext
\xmlprocessfile{personen}{personen.xml}{}
\stoptext


The generated PDF-file only consists of one page with the chapter
"Personalverzeichnis". Can anybody tell me, where the mistake is?

Daniel




More information about the ntg-context mailing list