On Thu, Oct 9, 2008 at 8:13 PM, Johannes Graumann <[EMAIL PROTECTED]> wrote: > Wolfgang Schuster <schuster.wolfgang <at> googlemail.com> writes: > >> \xmlprocess{main}{zip:///\inputfilename.odt?name=content.xml}{} >> >> or >> >> \usezipfile[\inputfilename.odt] >> \xmlprocess{main}{*/content.xml}{} > > Thank you very much - very nice! > >> You could use this for the start but it behavious a little bit weird. >> >> \unprotect >> >> \def\switchfontstyle >> {\ifx\fontalternative\c!tf \it \else >> \ifx\fontalternative\c!bf \bi \else >> \it \fi\fi} >> >> \protect >> >> \xmlmapvalue {fo:font-style} {italic} {\switchfontstyle} > > Hmm ... if I understand this correctly this is aimed at dealing with nested > bold/italic attributes? > > While I'm certainly going to fall over this rather soon, I think the issue > here > is that the following excerpt, where "T1" and "T2" correspond to bold and > italic > definitions further up, is misinterpreted such that the opening "text:span" of > the "T1" section is taken for the beginning of the "T2" section instead and > "T2" > is accordingly applied to the whole construct ... > > <text:p text:style-name="Standard"> > Versuch > <text:span text:style-name="T1"> > Bold Versuch > </text:span> > <text:span text:style-name="T2"> > Italic Versuch > </text:span> > </text:p> > > Where in Hans' snippet below might that be fixable? > > \startxmlsetups office > \xmlsetsetup{main}{text:p|text:span}{*} > \stopxmlsetups > xmlregistersetup{office} > > \startxmlsetups text:p > \xmlflush{#1}\par > \stopxmlsetups > > \startxmlsetups text:span > \bgroup > > \xmlfilter{main}{office:automatic-styles/style:style/style:text-properties > /command(do:style:text-properties)} > \xmlflush{#1} > \egroup > \stopxmlsetups
\startxmlsetups text:span \bgroup \xmlfilter{main}{office:automatic-styles/style:[EMAIL PROTECTED]:name='\xmlatt{#1}{style-name}']/style:text-properties/command(do:style:text-properties)} \xmlflush{#1} \egroup \stopxmlsetups 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________