ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Michael Wigston <Michael.Wigston@asic.gov.au>
Subject: Re: Problems mapping Xml into ConTeXt
Date: Fri, 13 Oct 2006 10:43:41 +1000	[thread overview]
Message-ID: <OF70D28DA4.D8662390-ONCA257205.0079FB75-CA257206.0003FFEB@asic.gov.au> (raw)
In-Reply-To: <452DE679.2040406@wxs.nl>


[-- Attachment #1.1: Type: text/plain, Size: 3320 bytes --]

> Michael Wigston wrote:
> >
> > Hans Hagen wrote:
> > > Michael Wigston wrote:
> > > > 1.  This def of <u> does nothing ...
> > > > \defineXMLgrouped [u] \underbar
> > > >
> > > \defineXMLargument[u]{\underbar}
> > >
> > > underbar is not a font switch but a macro that takes an argument
> >
> > Hans,
> >
> > Thanks, that works fine with \underbar, as well as \underbars, 
> > \overstrike, \overstrikes, \low, \high and \lohi.
> >
> > You mentioned that \underbar (and presumably the others I mentioned 
> > above) are macros taking arguments e.g. \acommand{...}. However 
> > presumably something like \midaligned{...}  is also a macro requiring 
> > an argument, but this works as a \defineXMLgrouped and as a 
> > \defineXMLargument - why does it  work with both?
> the macro ones do manipulate their argument, for instance, underbar is 
> not a font charateristic or color switch or so i.e. not a real 
> attribute; esp using setups will make your style look better (look into 
> x-fo for instance, forget about the dirty tricks there, but it's pretty 
> clean; mapping values and so save many macro definitions
> >
> > The manual "XML in ConTeXt" very briefly sketched over these XML 
> > commands and I can see great potential to use them directly on XML to 
> > generate ConTeXt for PDF rather than the XSLT/XSL-FO route which seems 

> > to be gaining momentum in much of the industry. I don't suppose there 
> > is another more detailed document which elaborates on the XML 
> > commands, and how you may determine which of these is most appropriate 

> > for what kind of ConTeXt command mapping? 
> you can take a look into the x-* files which show quite some mappings; 
> indeed direct mapping is often more convenient than transformations; 
> future versions of context will also offer more manipulation 
possibilities
> >
> >
> > Also at the moment a non-mapped element seems to automatically type 
> > out its contents as straight text - is there a way to override this 
> > behaviour and specify this as an error? (This is rather like the Ruby 
> > duck-typing approach - if an XML element is mapped, process it, else 
> > it is an error). 
> \startXMLignore
> \stopXMLignore 
> 
> in xtag-pre you can see: 
> 
> \defineXMLenvironment [\s!default] \defaultXMLelement \defaultXMLelement
> \defineXMLsingular    [\s!default] \defaultXMLelement
> 
> % \def\defaultXMLelement
> %   {\iftraceXMLelements[\currentXMLfullidentifier]\fi}
> 
> \def\defaultXMLelement
>   {\iftraceXMLelements{\infofont<\currentXMLfullidentifier>}\fi}
> 
> %D We can use the default handler to implement automatic
> %D element hiding. Beware: this overloads the tracer.
> 
> \def\startXMLignore{\dododefineXMLignore \s!default}
> \def\stopXMLignore {\dododefineXMLprocess\s!default}
> 
> so you can play with the default handlers 
> 

Thanks, looks like I'll have to do some digging in the x-* files ...

Regards,


NOTICE
This e-mail and any attachments are intended for the addressee(s) only and may be confidential.  They may contain legally privileged or copyright material.  You should not read, copy, use or disclose them without authorisation.  If you are not the intended recipient please contact the sender as soon as possible by return e-mail and then please delete both messages.  This notice should not be removed.  

[-- Attachment #1.2: Type: text/html, Size: 4305 bytes --]

[-- Attachment #2: Type: text/plain, Size: 139 bytes --]

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

  reply	other threads:[~2006-10-13  0:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.1.1160560804.6611.ntg-context@ntg.nl>
2006-10-12  3:36 ` Michael Wigston
2006-10-12  6:53   ` Hans Hagen
2006-10-13  0:43     ` Michael Wigston [this message]
2006-10-11  5:12 Michael Wigston
2006-10-11  7:49 ` Hans Hagen

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=OF70D28DA4.D8662390-ONCA257205.0079FB75-CA257206.0003FFEB@asic.gov.au \
    --to=michael.wigston@asic.gov.au \
    --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).