Am 10.03.2010 um 11:38 schrieb Thomas A. Schmitz: > 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.
Sorry for being confused: In your MyWay you talk about xml and show an xhtml example. It seems I mixed this. > 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. 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:" > 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? When reading Taco's reply to that thread ... >>>> Needs an example file, because >>>> >>>> \defineXMLentity[addhyphen]{\-} >>>> \starttext >>>> \hsize 1in >>>> \startXMLdata >>>> I tried super&addhyphen;duper >>>> \stopXMLdata >>>> \stoptext >>>> >>>> works in both mkii and mkiv. ... I assumed it's the same in mkii and mkiv? Steffen ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : [email protected] / 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 ___________________________________________________________________________________
