Jump to content

Transforming XHTML for MS Access


stat136

Recommended Posts

Hi Everyone. I am trying to read-in and transform XHTML files so I could import them into MS Access 2007. I am not a programmer but I really want to learn how to do it so I tried to learn here. First, I got confused about the structure of my XML, I am not sure if it was in fact plain XML or XHTML. When I am creating a XSL, I would be successful reading it in if I cleaned some of the "additional" statements like div, etc. But you see, I can't do that manually because I am trying to read in approx. 60 XML (?) files. Could anyone please help me? I am pasting below a subset of the XML file and my code. Thanks in advance.XML:<Version> <xmlsource>This XML content was developed by AHRQ's contractor ECRI Institute for the National Quality Measures Clearinghouse (NQMC).</xmlsource> <Section SecID="298" OrdBy="100" Name="General"><Field FieldID="11" OrdBy="105" ID="299" Name="Title" Type="text"> <FieldValue Value="<div class="content_title">Advanced chronic kidney disease (CKD): percent of patients with documentation about counseling for increasing physical activity.</div>" /> </Field><Field FieldID="1" OrdBy="110" ID="300" Name="Source(s)" Type="citation"> <FieldValue Value="<table><tr><td>Renal Physicians Association. Appropriate patient preparation for renal replacement therapy. Rockville (MD): Renal Physicians Association; 2002 Oct 1. 78 p. (Clinical Practice Guideline; no. 3).</td></tr></table>" /> </Field> </Section></Version>XSL: <?xml version="1.0" ?> <xsl:stylesheet version="2.0" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xhtml xsl xs"> <xsl:output method="xml" version="1.0" encoding="UTF-8" doctype-public="-//W3C//DTD XHTML 1.1//EN" doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" indent="yes" /> <xsl:template match="/"><xsl:for-each select="Version/Section/Field"> <xsl:value-of select="FieldValue" /> </xsl:for-each> </xsl:template> </xsl:stylesheet>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...