ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* XML
@ 2008-10-07 22:14 johannes_graumann
  2008-10-08  6:34 ` XML luigi scarso
  2008-10-09  7:50 ` XML Wolfgang Schuster
  0 siblings, 2 replies; 22+ messages in thread
From: johannes_graumann @ 2008-10-07 22:14 UTC (permalink / raw)
  To: ntg-context


[-- 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="&apos;Liberation Serif&apos;" style:font-family-generic="roman" style:font-pitch="variable"/><style:font-face style:name="Liberation Sans" svg:font-family="&apos;Liberation Sans&apos;" style:font-family-generic="swiss" style:font-pitch="variable"/><style:font-face style:name="DejaVu Sans" svg:font-family="&apos;DejaVu Sans&apos;" 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="&apos;Liberation Serif&apos;" style:font-family-generic="roman" style:font-pitch="variable"/><style:font-face style:name="Liberation Sans" svg:font-family="&apos;Liberation Sans&apos;" style:font-family-generic="swiss" style:font-pitch="variable"/><style:font-face style:name="DejaVu Sans" svg:font-family="&apos;DejaVu Sans&apos;" 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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 22+ messages in thread
* XML
@ 2005-09-22  6:29 Jessica Holle
  2005-09-22  6:39 ` XML Henning Hraban Ramm
  0 siblings, 1 reply; 22+ messages in thread
From: Jessica Holle @ 2005-09-22  6:29 UTC (permalink / raw)



Hi,

I've a question.
Is it possible to fill a table or a document in ConTeXt with content
from a XML file?
Where do I find documentation about this? I didn't find something in
the PDF's

Thx

Jessica

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2008-10-29  7:09 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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       ` 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

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).