From: johannes_graumann@web.de
To: ntg-context@ntg.nl
Subject: XML
Date: Tue, 7 Oct 2008 22:14:44 +0000 [thread overview]
Message-ID: <200810072214.52895.johannes_graumann@web.de> (raw)
[-- Attachment #1.1.1: Type: text/plain, Size: 902 bytes --]
Hello,
The family is gone for the week, so I have time to play ...
What I'm doing is the following(using the attached files):
context --ctx=t-openoffice BoldOnlyContent.xml
Which works nicely.
I'd like to make this work like so:
context --ctx=t-openoffice VersuchBoldOnly.odt
but whether I change the respective line in t-openoffice.tex to
\xmlprocess{main}{zip://*/content.xml}{}
or
\xmlprocess{main}{*/content.xml}{}
- no luck ... how to do this?
Hans let me know how to parse xml styles on the fly, but I fail to generalize
this further. When uncommenting the line
\xmlval{fo:font-style}{\xmlatt{#1}{font-style}}{}
in t-openoffice.tex this doesn't work as expected:
context --ctx=t-openoffice BoldAndItalicContent.xml
Any hints on how to fix this?
I have asked related questions in the past, but have now a bit of time to
investigate further ...
Thanks, Joh
[-- Attachment #1.1.2: t-openoffice.tex --]
[-- Type: text/x-tex, Size: 878 bytes --]
\startenvironment t-openoffice.tex
\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 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://*/content.xml}{}
\xmlprocess{main}{content.xml}{}
\stoptext
\stopenvironment
[-- Attachment #1.1.3: BoldOnlyContent.xml --]
[-- Type: text/xml, Size: 3357 bytes --]
<?xml version="1.0" encoding="UTF-8"?>
<office:document-content xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:field="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:field:1.0" office:version="1.1"><office:scripts/><office:font-face-decls><style:font-face style:name="Liberation Serif" svg:font-family="'Liberation Serif'" style:font-family-generic="roman" style:font-pitch="variable"/><style:font-face style:name="Liberation Sans" svg:font-family="'Liberation Sans'" style:font-family-generic="swiss" style:font-pitch="variable"/><style:font-face style:name="DejaVu Sans" svg:font-family="'DejaVu Sans'" style:font-family-generic="system" style:font-pitch="variable"/></office:font-face-decls><office:automatic-styles><style:style style:name="T1" style:family="text"><style:text-properties fo:font-weight="bold" style:font-weight-asian="bold" style:font-weight-complex="bold"/></style:style><style:style style:name="T2" style:family="text"><style:text-properties fo:font-style="italic" fo:font-weight="bold" style:font-style-asian="italic" style:font-weight-asian="bold" style:font-style-complex="italic" style:font-weight-complex="bold"/></style:style><style:style style:name="T3" style:family="text"><style:text-properties fo:font-style="italic" style:text-underline-style="solid" style:text-underline-width="auto" style:text-underline-color="font-color" fo:font-weight="bold" style:font-style-asian="italic" style:font-weight-asian="bold" style:font-style-complex="italic" style:font-weight-complex="bold"/></style:style></office:automatic-styles><office:body><office:text><text:sequence-decls><text:sequence-decl text:display-outline-level="0" text:name="Illustration"/><text:sequence-decl text:display-outline-level="0" text:name="Table"/><text:sequence-decl text:display-outline-level="0" text:name="Text"/><text:sequence-decl text:display-outline-level="0" text:name="Drawing"/></text:sequence-decls><text:p text:style-name="Standard">Versuch <text:span text:style-name="T1">Bold Versuch</text:span></text:p></office:text></office:body></office:document-content>
[-- Attachment #1.1.4: t-openoffice.ctx --]
[-- Type: text/plain, Size: 386 bytes --]
<?xml version='1.0' standalone='yes'?>
<ctx:job>
<ctx:message>open office processing</ctx:message>
<ctx:preprocess/>
<ctx:flags>
<ctx:flag>purge</ctx:flag>
<ctx:flag>texengine=luatex</ctx:flag>
<ctx:flag>interface=en</ctx:flag>
</ctx:flags>
<ctx:process>
<ctx:resources>
<ctx:environment>t-openoffice.tex</ctx:environment>
</ctx:resources>
</ctx:process>
<ctx:postprocess/>
</ctx:job>
[-- Attachment #1.1.5: VersuchBoldOnly.odt --]
[-- Type: application/vnd.oasis.opendocument.text, Size: 7682 bytes --]
[-- Attachment #1.1.6: BoldAndItalicContent.xml --]
[-- Type: text/xml, Size: 3229 bytes --]
<?xml version="1.0" encoding="UTF-8"?>
<office:document-content xmln:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:field="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:field:1.0" office:version="1.1"><office:scripts/><office:font-face-decls><style:font-face style:name="Liberation Serif" svg:font-family="'Liberation Serif'" style:font-family-generic="roman" style:font-pitch="variable"/><style:font-face style:name="Liberation Sans" svg:font-family="'Liberation Sans'" style:font-family-generic="swiss" style:font-pitch="variable"/><style:font-face style:name="DejaVu Sans" svg:font-family="'DejaVu Sans'" style:font-family-generic="system" style:font-pitch="variable"/></office:font-face-decls><office:automatic-styles><style:style style:name="T1" style:family="text"><style:text-properties fo:font-weight="bold" style:font-weight-asian="bold" style:font-weight-complex="bold"/></style:style><style:style style:name="T2" style:family="text"><style:text-properties fo:font-style="italic" fo:font-weight="normal" style:font-style-asian="italic" style:font-weight-asian="normal" style:font-style-complex="italic" style:font-weight-complex="normal"/></style:style><style:style style:name="T3" style:family="text"><style:text-properties fo:font-weight="normal" style:font-weight-asian="normal" style:font-weight-complex="normal"/></style:style></office:automatic-styles><office:body><office:text><text:sequence-decls><text:sequence-decl text:display-outline-level="0" text:name="Illustration"/><text:sequence-decl text:display-outline-level="0" text:name="Table"/><text:sequence-decl text:display-outline-level="0" text:name="Text"/><text:sequence-decl text:display-outline-level="0" text:name="Drawing"/></text:sequence-decls><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></office:text></office:body></office:document-content>
[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 835 bytes --]
[-- Attachment #2: 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
___________________________________________________________________________________
next reply other threads:[~2008-10-07 22:14 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-07 22:14 johannes_graumann [this message]
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 ` XML Johannes Graumann
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=200810072214.52895.johannes_graumann@web.de \
--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).