Hello, I have a couple of XML's generated by a freeware program which I want to process with Context. I started experimenting and things look good, however I want to skip/filter out some of the xml tags like *<computeraudit> Some Text .... </computeraudit>* and *<disclaimer> Some Text </disclaimer>* so they don't show in the resulting PDF. The Tex and XML files are listed below. \usemodule[contml] \defineXMLargument [category] {\chapter{ \XMLpar{category}{title}{} }} \defineXMLargument [subcategory] {\section{ \XMLpar{subcategory}{title}{} }} \defineXMLenvironment [list] \startitemize \stopitemize \defineXMLenvironment [item] \item \par \defineXMLenvironment [recordset] \bTABLE \eTABLE \defineXMLpickup [datarow] \bTR \eTR \defineXMLpickup [fieldvalue] \bTD \eTD \starttext \processXMLfilegrouped{Bios.xml} \stoptext <?xml ============== File Bios.xml ===================> <?xml version="1.0" encoding="utf-8" standalone="yes"?> <?xml-stylesheet type="text/xsl" href="wa_xml2html.xsl"?> <computeraudit> <title>Computer Audit :: 03-Sep-2006 18:25:08</title> <category title="BIOS Version"> <subcategory title=""> <recordset title=""> <fieldname>Item</fieldname> <fieldname>Value</fieldname> <datarow> <fieldvalue>System Version</fieldvalue> <fieldvalue>ASUS - 30303031 Award Medallion BIOS v6.0 Award Plug and Play BIOS Extension v1.0A Award Modular BIOS v6.0</fieldvalue> </datarow> <datarow> <fieldvalue>System Date</fieldvalue> <fieldvalue>08/20/02</fieldvalue> </datarow> <datarow> <fieldvalue>Video Version</fieldvalue> <fieldvalue>ASUS AGP-V7700 VGA BIOS Version 2.15.01.14 ASUS AGP-V7700 VGA BIOS Version 2.15.01.14 ASUS AGP-V7700 VGA BIOS Version 2.15.01.14</fieldvalue> </datarow> <datarow> <fieldvalue>Video Date</fieldvalue> <fieldvalue>08/17/00</fieldvalue> </datarow> </recordset> </subcategory> </category> <disclaimer>Names mentioned herein maybe trademarks or service marks of their respective holders. Errors and Omissions Excepted. </disclaimer> </computeraudit>
WN wrote:
Hello,
I have a couple of XML's generated by a freeware program which I want to process with Context. I started experimenting and things look good, however I want to skip/filter out some of the xml tags like *<computeraudit> Some Text .... </computeraudit>* and *<disclaimer> Some Text </disclaimer>* so they don't show in the resulting PDF. \defineXMLignore[*computeraudit]*
----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
pragma@wxs.nl wrote:
WN wrote:
Another question, still learning, I am struggling with the following. In the XML there is a tag <recordset> indicating a set of records which I map to table entries. After this tag a couple of tags labelled <fieldname> should be translated to table header entries followed by <datarow> which I map to a table row (\bTR \eTR) but the tag <fieldname> is not grouped in a <datarow> tag. How can I translate the <fieldname> tags so they will be interpreted as entries in the table header ? Wim example XML <category title="BIOS Version"> <subcategory title=""> <recordset title=""> <fieldname>Item</fieldname> <fieldname>Value</fieldname> <datarow> <fieldvalue>System Version</fieldvalue> <fieldvalue>ASUS - 30303031 Award Medallion BIOS v6.0 Award Plug and Play BIOS Extension v1.0A Award Modular BIOS v6.0</fieldvalue> </recordset> </subcategory> </category>
Hello,
I have a couple of XML's generated by a freeware program which I want to process with Context. I started experimenting and things look good, however I want to skip/filter out some of the xml tags like *<computeraudit> Some Text .... </computeraudit>* and *<disclaimer> Some Text </disclaimer>* so they don't show in the resulting PDF.
\defineXMLignore[*computeraudit]*
----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
_______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
participants (2)
-
Hans Hagen
-
WN