From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/100940 Path: news.gmane.org!.POSTED!not-for-mail From: Keith McKay Newsgroups: gmane.comp.tex.context Subject: First example in xml-mkiv.pdf Date: Tue, 5 Jun 2018 21:03:51 +0100 Organization: The PotHole Press Message-ID: <5d6fddf2-c1d7-5560-7c1a-a7691143a672@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0240266343470591583==" X-Trace: blaine.gmane.org 1528228933 13610 195.159.176.226 (5 Jun 2018 20:02:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 5 Jun 2018 20:02:13 +0000 (UTC) User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Jun 05 22:02:08 2018 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fQI9f-0003Qo-WD for gctc-ntg-context-518@m.gmane.org; Tue, 05 Jun 2018 22:02:08 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id DE286329E6; Tue, 5 Jun 2018 22:04:06 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2mJlGV0NXyCP; Tue, 5 Jun 2018 22:04:06 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id 31B50329E8; Tue, 5 Jun 2018 22:04:06 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 5BE6B329E5 for ; Tue, 5 Jun 2018 22:04:05 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 91pQgRh1eMFG for ; Tue, 5 Jun 2018 22:04:04 +0200 (CEST) Original-Received: from mail-wm0-f52.google.com (mail-wm0-f52.google.com [74.125.82.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id D044B329E4 for ; Tue, 5 Jun 2018 22:03:54 +0200 (CEST) Original-Received: by mail-wm0-f52.google.com with SMTP id e16-v6so7226410wmd.0 for ; Tue, 05 Jun 2018 13:03:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:subject:organization:message-id:date:user-agent :mime-version:content-language; bh=fvHllIyhxqm+TrnCKcKlXI1OyYdpV2CYts0dEvFCPW4=; b=pjVcFvEkfq1r5qG7np7SAWJRKNCMUC3k5Y+tTiJZZp0Kfgy7FOSuruIOy73G2xWb4A QPMYSikZClXGgxmaHu5gBI+bDyJthiIvUxgagsDF03tdGl5QNM3h7syD5gXbIUA6EiBD R3dtuJKCJcbgqLjHnnDQP4mhN+tswR/zf0kul1suWkY0JQLDvK7Nl4vohTeYYuzGu5I9 lfvkA5fCphhpKruk+EDG6TV3OQiatVkWhB5jYluCVNSvjOHUoy8Zls7MCv2YbuFMf8VU Ocxu+EYMw+3MsRSjvxuXV6dIQqg1b++sZAI7wFCcwqPKd656Y1blTVO4w9qQyUK1dR81 mx9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:organization:message-id:date :user-agent:mime-version:content-language; bh=fvHllIyhxqm+TrnCKcKlXI1OyYdpV2CYts0dEvFCPW4=; b=aqijIuQlGN1XHLPhtVE4ZAywzKFDHkpZbRpO3wSIKi1lxAZcnKY63UsWH6PFCoJ2CJ BrcwJe2thKOwaHwg50EhPKbo/iATxWKQELZbgCs8CfC5z9uJpAMdcGphYAF1beqJtrAC eGxSpxsK8P20ijnNp1Bucn0I2EE6L29E20LOg7bZ6MSFPhgKFN5cNN9i0rtsH/+GA5/m 1psPmtpZSTRkNKpJPGEym3yvwsT/wQ5NPsTqJ/zz+4I4tCgk9O3n9QddoIrxGjyoOI99 EkDYQE3/0GBfnYsk6ixueqhAEpZg+vBKBGDydwWtdZABmD/VkPGuanGMcIn0iPdF16sN /amA== X-Gm-Message-State: APt69E2++GhEJcxMNpvkhyYMStR+dY9kYU163jDcmJtZ+D6AD2OUhN0w hmjvGh48SfQ7g+C3QXT6fh+6kg== X-Google-Smtp-Source: ADUXVKLJP04N9pyeyvOWV7eUHth8REZIvxOkoVqHljeLN+PPVzT9BGxqlYzmCxWR0kSC4roOll97lA== X-Received: by 2002:a1c:47cf:: with SMTP id m76-v6mr358621wmi.70.1528229033974; Tue, 05 Jun 2018 13:03:53 -0700 (PDT) Original-Received: from Keiths-Mac-mini.local (cpc1-uddi28-2-0-cust125.20-3.cable.virginm.net. [92.236.230.126]) by smtp.googlemail.com with ESMTPSA id x130-v6sm3250176wme.24.2018.06.05.13.03.52 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Jun 2018 13:03:52 -0700 (PDT) Content-Language: en-US X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.org gmane.comp.tex.context:100940 Archived-At: This is a multi-part message in MIME format. --===============0240266343470591583== Content-Type: multipart/alternative; boundary="------------B0AAF0C8FAEC80E3B3E1AD2F" Content-Language: en-US This is a multi-part message in MIME format. --------------B0AAF0C8FAEC80E3B3E1AD2F Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Dear List, In my continuing effort to improve my ConTeXt skills I thought I would have a look at XML and ConTeXt. Note: I have no XML skills but, "in for a penny, in for a pound", as they say over here. I started by looking at the very first example on page 5 of "Dealing with XML in ConTeXt mkiv" and straight away hit a problem.  There is a typo in the first line of the XML file which I corrected: should be However when I ran the file using the tex file it only produced a 3 page pdf with a contents page and 2 title pages and no other text. Here is the XML file which is the similar to the one on page 5 but with two sections rather than one:
Some title

a paragraph of text

another paragraph of text

Another title

a paragraph of text

another paragraph of text

The TeX file is cut and pasted from pages 5 and 6 of xml-mkiv.pdf: \startxmlsetups xml:demo:base \xmlsetsetup{#1}{document|section|p|itemize|item}{xml:demo:*} \stopxmlsetups \xmlregisterdocumentsetup{demo}{xml:demo:base} \startxmlsetups xml:demo:document \starttitle[title={Contents}] \placelist[chapter] \stoptitle \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:demo:section \startchapter[title=\xmlfirst{#1}{/title}] \xmlfirst{#1}{/content} \stopchapter \stopxmlsetups \startxmlsetups xml:demo:p \xmlflush{#1}\endgraf \stopxmlsetups \xmlprocessfile{demo}{demo.xml}{} This seemed such a simple example and I'm a bit perplexed as to why it did not work. Can somebody explain why no paragraphs are showing up? I'm using: ConTeXt ver: 2018.04.04 00:51 MKIV beta fmt: 2018.6.2 int: english/english LuaTeX, Version 1.07.0 (TeX Live 2018) Thanks and Best Wishes Keith McKay --------------B0AAF0C8FAEC80E3B3E1AD2F Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit

Dear List,

In my continuing effort to improve my ConTeXt skills I thought I would have a look at XML and ConTeXt. Note: I have no XML skills but, "in for a penny, in for a pound", as they say over here. I started by looking at the very first example on page 5 of "Dealing with XML in ConTeXt mkiv" and straight away hit a problem.  There is a typo in the first line of the XML file which I corrected:

<?xml version='1.0' standalone='yes?>

should be

<?xml version="1.0" standalone="yes"?>

However when I ran the file using the tex file it only produced a 3 page pdf with a contents page and 2 title pages and no other text.

Here is the XML file which is the similar to the one on page 5 but with two sections rather than one:

<?xml version="1.0" standalone="yes"?>

<document>

<section>

<title>Some title</title>

<content>

<p>a paragraph of text</p>

<p>another paragraph of text</p>

</content>

</section>

<section>

<title>Another title</title>

<content>

<p>a paragraph of text</p>

<p>another paragraph of text</p>

</content>

</section>

</document>

The TeX file is cut and pasted from pages 5 and 6 of xml-mkiv.pdf:

\startxmlsetups xml:demo:base

\xmlsetsetup{#1}{document|section|p|itemize|item}{xml:demo:*}

\stopxmlsetups

\xmlregisterdocumentsetup{demo}{xml:demo:base}

\startxmlsetups xml:demo:document

\starttitle[title={Contents}]

\placelist[chapter]

\stoptitle

\xmlflush{#1}

\stopxmlsetups

\startxmlsetups xml:demo:section

\startchapter[title=\xmlfirst{#1}{/title}]

\xmlfirst{#1}{/content}

\stopchapter

\stopxmlsetups

\startxmlsetups xml:demo:p

\xmlflush{#1}\endgraf

\stopxmlsetups

\xmlprocessfile{demo}{demo.xml}{}

This seemed such a simple example and I'm a bit perplexed as to why it did not work. Can somebody explain why no paragraphs are showing up? I'm using:

ConTeXt ver: 2018.04.04 00:51 MKIV beta fmt: 2018.6.2 int: english/english

LuaTeX, Version 1.07.0 (TeX Live 2018)

Thanks and Best Wishes

Keith McKay

--------------B0AAF0C8FAEC80E3B3E1AD2F-- --===============0240266343470591583== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f --===============0240266343470591583==--