ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Johannes Graumann <johannes_graumann@web.de>
To: ntg-context@ntg.nl
Subject: Re: XML
Date: Sun, 19 Oct 2008 22:38:26 +0200	[thread overview]
Message-ID: <gdg5q6$f8u$1@ger.gmane.org> (raw)
In-Reply-To: <115224fb0810140024o1b1d1365ld7604568be1e4ddd@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 783 bytes --]

Wolfgang Schuster wrote:
>> \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:style[@style:name='\xmlatt{#1}{style-name}']/style:text-properties/command(do:style:text-properties)}
>       \xmlflush{#1}
>     \egroup
>   \stopxmlsetups

Hello Wolfgang,

I just don't get it to run. Using the attached and 
	context --ctx=t-openoffice Attempt.odt
I get the result in the pdf ... strange whitespace and no bold anywhere to be seen. Can you give me another nudge ... I start to understand what Hans and you are actually doing, but this is still beyond me.

Cheers, Joh

[-- Attachment #2: Attempt.odt --]
[-- Type: application/vnd.oasis.opendocument.text, Size: 8037 bytes --]

[-- Attachment #3: Attempt.pdf --]
[-- Type: application/pdf, Size: 5287 bytes --]

[-- Attachment #4: t-openoffice.ctx --]
[-- Type: application/xml, Size: 386 bytes --]

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #5: t-openoffice.tex --]
[-- Type: text/x-tex; name="t-openoffice.tex", Size: 1041 bytes --]

%context --ctx=t-openoffice BoldAndItalicContent.xml

\startenvironment t-openoffice.tex

  \startxmlsetups office
    \xmlsetsetup{main}{text:p|text:span}{*}
  \stopxmlsetups
  \xmlregistersetup{office}

  \startxmlsetups text:p
    \xmlflush{#1}\endgraf
  \stopxmlsetups

  \startxmlsetups text:span
    \bgroup
      \xmlfilter{main}{office:automatic-styles/style:style[@style:name='\xmlatt{#1}{style-name}']/style:text-properties/command(do:style:textproperties)}
      \xmlflush{#1}
    \egroup
  \stopxmlsetups

  \startxmlsetups do:style:text-properties
    \xmlval{fo:font-weight}{\xmlatt{#1}{font-weight}}{}% todo: namespaces in attributes
    \xmlval{fo:font-style}{\xmlatt{#1}{font-style}}{}
  \stopxmlsetups

  \xmlmapvalue{fo:font-weight}{bold}{\bf}
  \xmlmapvalue{fo:font-style}{italic}{\it}

  \starttext
    %\xmlprocess{main}{zip:///\inputfilename.odt?name=content.xml}{}
    \usezipfile[\inputfilename.odt]
    \xmlprocess{main}{*/content.xml}{}
  \stoptext
  
\stopenvironment


[-- Attachment #6: Type: text/plain, Size: 487 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

  parent reply	other threads:[~2008-10-19 20:38 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-07 22:14 XML johannes_graumann
2008-10-08  6:34 ` XML luigi scarso
2008-10-08  8:02   ` XML Johannes Graumann
2008-10-08  8:11     ` XML luigi scarso
2008-10-09  7:50 ` XML Wolfgang Schuster
2008-10-09 18:13   ` XML Johannes Graumann
2008-10-14  7:24     ` XML Wolfgang Schuster
2008-10-16  8:24       ` XML Johannes Graumann
2008-10-18  7:28         ` XML olivier Turlier
2008-10-19 13:25           ` XML Johannes Graumann
2008-10-16  8:27       ` XML Johannes Graumann
2008-10-19 20:38       ` Johannes Graumann [this message]
2008-10-22  6:50         ` XML Wolfgang Schuster
2008-10-22 14:56           ` XML Johannes Graumann
2008-10-22 21:04           ` XML Johannes Graumann
2008-10-22 21:30             ` XML Hans Hagen
2008-10-26 14:05               ` XML Johannes Graumann
2008-10-27 10:42                 ` XML Wolfgang Schuster
2008-10-27 20:16                   ` XML Johannes Graumann
2008-10-29  7:09                     ` XML Wolfgang Schuster
  -- strict thread matches above, loose matches on Subject: below --
2005-09-22  6:29 XML Jessica Holle
2005-09-22  6:39 ` XML Henning Hraban Ramm

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='gdg5q6$f8u$1@ger.gmane.org' \
    --to=johannes_graumann@web.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).