On Mar 10, 2010, at 10:58 AM, Steffen Wolfrum wrote:
Hi,
very carefully I am trying to make first steps towards XML and ConTeXt (with MkIV).
Thus, I have enjoyed reading Thomas' MyWay "Getting Web Content and pdf-Output from One Source":
I only kept wondering, how to keep control over the pdf-Output in terms of fine-tuning the actual typesetting? A quick search in the archive gave me the answer that is attached below: by using XMLentities.
But coming back to Thomas' issue "Getting Web Content and pdf-Output from One Source": What about the other branch, getting web content? Doesn't the XML source gets "spoiled" by these inserted XMLentities that only make sense when following the pdf-Output branch? Or will these XMLentities be silently ignored when feeding the XML source in a CMS system or processing further to web content?
Apologies for asking such basic questions...
I'm not really that advanced in this area myself, but from what I think I understood, you have to distinguish several aspects: 1. The MyWay addressed xhtml and mapping that to ConTeXt output. In html, you have a list of predefined entities (http://www.w3schools.com/tags/ref_entities.asp) and I don't think that you can simply define your own entities in html - this simply is not the way this is meant to work. So in this case, the answer to your question would be: you're using the wrong tool. 2. In xml, on the other hand, there are almost no predefined entities, you can and must define entities yourself. But xml in itself cannot be shown as web content; you will need a xsl file which translates your xml to some sort of html. This will allow you to define most anything you want, and you can indeed add all these typographical niceties. You can then either use a tool such as xsltproc or saxon to produce a "clean" html version yourself or you can leave it to the browser. So: if you're primarily thinking of web content that should also be typeset, use html and be aware that you probably won't be able to use all the power of ConTeXt. If you're thinking of content that will be typeset but which you also want to use in other forms (web content being just one of them), use xml. In that case, you will have to learn at least some xslt as well... Btw, the thread you quoted refers to mkii entities, you know that the deinitions in mkiv are somewhat different, right? Thomas