mperemsky
05-04-2009, 11:17 AM
Hello all, I am fairly new to xml/xsl and have a question. I am working on a project that has very tight security. It operates on a closed network and does not allow access to any external machines. I am trying to find out what DTDs are required to execute the xml/xsl transformations within our network (and how to acces them).
An example xml file looks like the following:
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="entity.xsl"?>
<document id="86448" title="CPP20071207968235_001124_a.txt" collection="OpenAirColl" date="28-Apr-2009 13:48">
<entities>
<entity name="ADDRESS_INTERNET">
<entry relpctg="15">OSCinfo@rccb.osis.gov</entry>
<entry relpctg="39">https://www.opensource.gov</entry>
</entity>
...
</entities>
</document>
An example xsl file looks like
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<head>
<link href="metareport.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="hdr1 center">Keywords By Entity Type By Document Report</div>
<div class="padtmed"></div>
...
</body>
</html>
</xsl:template>
</xsl:stylesheet>
If I change the <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> line, the data does not get transofrmed into the HTML file I expect (no data shows up). How can I find/get the DTD to allow the transformation to occur (e.g. xsl:for-each, xsl:value-of)? How do I specify the dtd locally in the xsl file?
An example xml file looks like the following:
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="entity.xsl"?>
<document id="86448" title="CPP20071207968235_001124_a.txt" collection="OpenAirColl" date="28-Apr-2009 13:48">
<entities>
<entity name="ADDRESS_INTERNET">
<entry relpctg="15">OSCinfo@rccb.osis.gov</entry>
<entry relpctg="39">https://www.opensource.gov</entry>
</entity>
...
</entities>
</document>
An example xsl file looks like
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<head>
<link href="metareport.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="hdr1 center">Keywords By Entity Type By Document Report</div>
<div class="padtmed"></div>
...
</body>
</html>
</xsl:template>
</xsl:stylesheet>
If I change the <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> line, the data does not get transofrmed into the HTML file I expect (no data shows up). How can I find/get the DTD to allow the transformation to occur (e.g. xsl:for-each, xsl:value-of)? How do I specify the dtd locally in the xsl file?