* not understanding ConTeXt-XML
@ 2010-03-08 14:05 Hans van der Meer
2010-03-08 14:22 ` Wolfgang Schuster
0 siblings, 1 reply; 2+ messages in thread
From: Hans van der Meer @ 2010-03-08 14:05 UTC (permalink / raw)
To: NTG ConTeXt
[-- Attachment #1.1: Type: text/plain, Size: 1717 bytes --]
I guess I am a bit stupid, but I do not understand how to process xml
in ConTeXt.
I started working through the contextXML-example.pdf from the Pragma
site.
I tried to follow the example on page 8 which reads:
% here go style definitions
% and XML to TEX mappings
\starttext
\processXMLfilegrouped {filename.xml}
\stoptext
In TeXShop (working in the latest context-beta) I have the tex-input:
\def\Filenumber#1{[#1]}
<xsl:template match="dvd">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="dvd/filenumber">
<xsl:text>\Filenumber{</xsl:text>
<xsl:text>{\bf </xsl:text>
<xsl:apply-templates/>
<xsl:text>}</xsl:text>
<xsl:text>}</xsl:text>
</xsl:template>
\starttext
\processXMLfilegrouped {xml-input.xml}
\stoptext
and in file name.xml:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<dvd>
<filenumber>D134</filenumber>
</dvd>
I get the obviously wrong result:
<xsl:template match="dvd"> <xsl:apply-templates/> </xsl:template>
<xsl:template match="dvd/filenumber"> <xsl:text>[</xsl:text>
<xsl:text></xsl:text>
<xsl:apply-templates/> <xsl:text></xsl:text> <xsl:text>]</xsl:text> </
xsl:template>
D134
My main problem seems to be the proper incantations and in the right
order.
What is the relation between the <xsl:template>-definitions and the
xml-processing, because these data show up in the result?
What is in this respect the function of macros like
\defineXMLenvironment, etc? From the example document I cannot infer
the relation between these and the <xsl:template>-definitions.
Just some pointers in the right direction may set me on the right
track. Thanks in advance.
Hans van der Meer
[-- Attachment #1.2: Type: text/html, Size: 7115 bytes --]
[-- Attachment #2: Type: text/plain, Size: 486 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] 2+ messages in thread
* Re: not understanding ConTeXt-XML
2010-03-08 14:05 not understanding ConTeXt-XML Hans van der Meer
@ 2010-03-08 14:22 ` Wolfgang Schuster
0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Schuster @ 2010-03-08 14:22 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 08.03.10 15:05, schrieb Hans van der Meer:
> I guess I am a bit stupid, but I do not understand how to process xml
> in ConTeXt.
> I started working through the contextXML-example.pdf from the Pragma site.
> I tried to follow the example on page 8 which reads:
For MKII you need the \defineXMLenvironment etc. commands.
For MKIV you should first read Thomas MyWay:
http://dl.contextgarden.net/myway/tas/
Wolfgang
___________________________________________________________________________________
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] 2+ messages in thread
end of thread, other threads:[~2010-03-08 14:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-08 14:05 not understanding ConTeXt-XML Hans van der Meer
2010-03-08 14:22 ` Wolfgang Schuster
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).