* ignoring an element in XML @ 2015-01-12 20:41 Pablo Rodriguez 2015-01-12 21:32 ` Hans Hagen 0 siblings, 1 reply; 3+ messages in thread From: Pablo Rodriguez @ 2015-01-12 20:41 UTC (permalink / raw) To: mailing list for ConTeXt users Dear list, I have an XML document with <h1> different elements. I want to parse the vast majority of them, but not the ones that are wrapped in a <div class="hidden"> element. Which is the right way to do it? The following doesn’t work: \xmlsetsetup{\xmldocument}{div[@class='hidden']/h1}{} Many thanks for your help, Pablo -- http://www.ousia.tk ___________________________________________________________________________________ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ignoring an element in XML 2015-01-12 20:41 ignoring an element in XML Pablo Rodriguez @ 2015-01-12 21:32 ` Hans Hagen 2015-01-12 22:14 ` Pablo Rodriguez 0 siblings, 1 reply; 3+ messages in thread From: Hans Hagen @ 2015-01-12 21:32 UTC (permalink / raw) To: ntg-context On 1/12/2015 9:41 PM, Pablo Rodriguez wrote: > Dear list, > > I have an XML document with <h1> different elements. > > I want to parse the vast majority of them, but not the ones that are > wrapped in a <div class="hidden"> element. > > Which is the right way to do it? The following doesn’t work: > > \xmlsetsetup{\xmldocument}{div[@class='hidden']/h1}{} replace {} by {xml:whatever} i.e. a non-existing setup ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl ----------------------------------------------------------------- ___________________________________________________________________________________ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ignoring an element in XML 2015-01-12 21:32 ` Hans Hagen @ 2015-01-12 22:14 ` Pablo Rodriguez 0 siblings, 0 replies; 3+ messages in thread From: Pablo Rodriguez @ 2015-01-12 22:14 UTC (permalink / raw) To: mailing list for ConTeXt users On 01/12/2015 10:32 PM, Hans Hagen wrote: > On 1/12/2015 9:41 PM, Pablo Rodriguez wrote: >> [...] >> \xmlsetsetup{\xmldocument}{div[@class='hidden']/h1}{} > > replace {} by {xml:whatever} i.e. a non-existing setup Many thanks for your reply, Hans. Both commands work in a minimal sample, but they don’t work in the real book :-(. It seems that I have to keep searching what I’m doing wrong. Many thanks for your help, Pablo -- http://www.ousia.tk ___________________________________________________________________________________ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-01-12 22:14 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2015-01-12 20:41 ignoring an element in XML Pablo Rodriguez 2015-01-12 21:32 ` Hans Hagen 2015-01-12 22:14 ` Pablo Rodriguez
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).