ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Thomas A. Schmitz" <thomas.schmitz@uni-bonn.de>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: xml content and tweaked pdf output
Date: Wed, 10 Mar 2010 13:35:36 +0100	[thread overview]
Message-ID: <F599FDAA-1DF6-4A3A-A181-238C5DECDF96@uni-bonn.de> (raw)
In-Reply-To: <9A419344-69EF-4D15-B10A-59FDCD06BD66@st.estfiles.de>


On Mar 10, 2010, at 12:49 PM, Steffen Wolfrum wrote:

> 
> Sorry for being confused: In your MyWay you talk about xml and show an xhtml example. It seems I mixed this.
> 
xhtml is a subset of xml, AFAIK. But maybe I should add a paragraph explaining this.

> 
> Exactly, this is what I meant:
> Wouldn't those typesetting orientated entities cause problems here?
> 
> If I follow Luigis link to ...
> http://www.w3schools.com/Xml/tryxslt.asp?xmlfile=simple&xsltfile=simple
> 
> ... and naively insert the mentioned below entity "addhyphen" ...
> "two of our famous Belgian&addhyphen;Waffles with plenty of real maple syrup"
> 
> ... the xslt process get's disturbed:
> "XML Parsing Error: undefined entity Location: http://www.w3schools.com/xsl/tryxslt_result.asp Line Number 7, Column 41:"
> 
> 
Yes, as I said: you have to define your entities, e.g. in the DOCTYPE declaration. That's something I discussed with Hans a few weeks ago: in the case you mention, you would have two different definitions of the entity &addhyphen; One in the DOCTYPE, which will be followed by the xslt processor:

<!ENTITY addhyphen "">

(i.e. do nothing about it)

and one in the ConTeXt environment file:

\xmlsetentity{addhyphen}{\-}

which will add the discretionary hyphen. And that's exactly what you wanted: typographical niceties for pdf output which will not disturb viewing the file on the web.
> 
> When reading Taco's reply to that thread ...
> 
> ..........

> ... I assumed it's the same in mkii and mkiv?
> 
Rule of thumb: mkii setups use uppercase XML, mkiv uses lowercase xml ("Introduction" of xml-mkiv.pdf). 

The main difference between the two is [Hans, is this right? correct me if I'm wrong]: mkii basically uses a streaming model, i.e., it translates one part of the xml file after the other. Reusing nodes and elements that have already been processed is possible, but difficult. mkiv loads the entire xml tree into memory; you can access any element at any time. 

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
___________________________________________________________________________________


  reply	other threads:[~2010-03-10 12:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-10  9:58 Steffen Wolfrum
2010-03-10 10:25 ` Italic correction is missing Mehdi Omidali
2010-03-10 10:42   ` Taco Hoekwater
2010-03-10 10:38 ` xml content and tweaked pdf output Thomas A. Schmitz
2010-03-10 10:48   ` luigi scarso
2010-03-10 11:49   ` Steffen Wolfrum
2010-03-10 12:35     ` Thomas A. Schmitz [this message]
2010-03-10 13:51       ` Steffen Wolfrum
2010-03-10 14:40       ` Hans Hagen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=F599FDAA-1DF6-4A3A-A181-238C5DECDF96@uni-bonn.de \
    --to=thomas.schmitz@uni-bonn.de \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).