ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Subtle problem nested XML
@ 2001-10-06 11:16 Berend de Boer
  2001-10-06 19:12 ` Taco Hoekwater
  2001-10-08  7:56 ` Hans Hagen
  0 siblings, 2 replies; 15+ messages in thread
From: Berend de Boer @ 2001-10-06 11:16 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 1464 bytes --]

Hello All,

I've detected that you cannot nest \startitemize when using ConTeXt's
XML mapping.

Take this file:

--------------------
% interface=en

\setupitemize
  [packed]

\starttext

\startitemize[n]
\item 1.
\item 2.
\item 3.
  \startitemize[a]
  \item a.
  \item b.
  \item c.
    \startitemize[r]
    \item i.
    \item ii.
    \item iii.
    \stopitemize
  \item d.
  \item e.
  \stopitemize
\item 4.
\item 5.
\stopitemize

\hairline

\defineXMLenvironment [list]
  {\startitemize[\XMLpar{list}{options}{}]} 
  {\stopitemize}

\defineXMLenvironment [listr]
  {\startitemize[r]} 
  {\stopitemize}

\defineXMLenvironment [lista]
  {\startitemize[a]} 
  {\stopitemize}

\defineXMLcommand     [li]            
  {\item}

\processXMLfilegrouped{test.xml}

\stoptext
--------------------

And this XML file:

--------------------------
<?xml version="1.0"?>
<text>
<list options="n">
<li> 1.</li>
<li> 2.</li>
<li> 3.
  <list options="a">
  <li>a.</li>
  <li>b.</li>
  <li>c.
    <list options="r">
    <li>i.</li>
    <li>ii.</li>
    <li>iii.</li>
    </list></li>
  <li>d.</li>
  <li>e.</li>
  </list></li>
<li> 4.</li>
<li> 5.</li>
</list>
</text>
--------------------------

This gives the wrong output. The problem is that it continues the
itemization with roman numers or letters in the parent level.

The problem is solved if you use different names for the tags, i.e. a
lista for alphabetic, listr for roman. Quite strange.

Or did I something wrong??

[-- Attachment #2: ConTeXt example --]
[-- Type: application/x-tex, Size: 636 bytes --]

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: Bug XML demo --]
[-- Type: text/xml, Size: 316 bytes --]

<?xml version="1.0"?>
<text>
<list options="n">
<li> 1.</li>
<li> 2.</li>
<li> 3.
  <list options="a">
  <li>a.</li>
  <li>b.</li>
  <li>c.
    <list options="r">
    <li>i.</li>
    <li>ii.</li>
    <li>iii.</li>
    </listr></li>
  <li>d.</li>
  <li>e.</li>
  </list></li>
<li> 4.</li>
<li> 5.</li>
</list>
</text>

[-- Attachment #4: Demo what's wrong --]
[-- Type: application/pdf, Size: 5466 bytes --]

[-- Attachment #5: Type: text/plain, Size: 27 bytes --]

-- 
Groetjes,

Berend. (-:

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

end of thread, other threads:[~2001-10-09 14:57 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-06 11:16 Subtle problem nested XML Berend de Boer
2001-10-06 19:12 ` Taco Hoekwater
2001-10-08  7:56 ` Hans Hagen
2001-10-08 18:06   ` Berend de Boer
2001-10-09  7:22     ` Hans Hagen
2001-10-09  9:49       ` Berend de Boer
2001-10-09 14:53         ` Hans Hagen
2001-10-09  7:31     ` Hans Hagen
2001-10-09  9:44       ` Berend de Boer
2001-10-09 14:57         ` Hans Hagen
2001-10-09  7:33     ` Hans Hagen
2001-10-09  9:51       ` Berend de Boer
2001-10-09 10:20         ` Taco Hoekwater
2001-10-09 14:44           ` Hans Hagen
2001-10-09 14:51         ` 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).