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 via email to