pie3141516
Programmer
Greetings,
I am having great difficulty displaying a
Photo with a stylesheet within a table dynamically.
I believe the following line
<img datasrc="#demographics" datafld="File" border="0" alt="Patient Photo" />
is causing the problem,
but I do not know how to fix it.
Any help would be greatly appreciated.
Thanks a zillion.
My xml file looks like this:
<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="ss.xsl"?>
<ContinuityOfCareRecord
xmlns:xsi="xsi:schemaLocation="urn:astm-org:CCR CCR_20051109.xsd"
xmlns="urn:astm-org:CCR">
<CCRDocumentObjectID>2008091400235414</CCRDocumentObjectID>
<Patient><ActorID>PATIENT_1001</ActorID></Patient>
<Actors>
<Actor>
<ActorObjectID>PATIENT_1001</ActorObjectID>
<Person>
<Name><Text>Doe</Text></Name>
<Gender><Text>Male</Text></Gender>
<Photo><File>pat_1001.bmp</File></Photo>
</Person>
</Actor>
</Actors>
</ContinuityOfCareRecord>
My stylesheet looks like this:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl=" xmlns:a="urn:astm-org:CCR" xmlns:date=" exclude-result-prefixes="a date">
<xsl
utput method="html" encoding="UTF-8"/>
<xsl
aram name="stylesheet"/>
<xsl:template match="/">
<html xmlns:date="<table id="demographics" class="list" width="50%">
<td>
<br/>
<body>
<tbody>
<tr>
<th>Name</th>
<th>Gender</th>
<th>Photo</th>
</tr>
<xsl:for-each select="a:ContinuityOfCareRecord/a
atient">
<xsl:variable name="objID" select="a:ActorID"/>
<xsl:for-each select="/a:ContinuityOfCareRecord/a:Actors/a:Actor">
<xsl:variable name="thisObjID" select="a:ActorObjectID"/>
<td>
<xsl:value-of select="a
erson/a:Name/a:Text"/>
</td>
<td>
<xsl:value-of select="a
erson/a:Gender/a:Text"/>
</td>
<td valign="top" width="100">
<img datasrc="#demographics" datafld="File" border="0" alt="Patient Photo" /> <!-- this is the line with the problem -->
</td>
</xsl:for-each>
</xsl:for-each>
</tbody>
</body>
</td>
</table>
</html>
</xsl:template>
</xsl:stylesheet>
I am having great difficulty displaying a
Photo with a stylesheet within a table dynamically.
I believe the following line
<img datasrc="#demographics" datafld="File" border="0" alt="Patient Photo" />
is causing the problem,
but I do not know how to fix it.
Any help would be greatly appreciated.
Thanks a zillion.
My xml file looks like this:
<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="ss.xsl"?>
<ContinuityOfCareRecord
xmlns:xsi="xsi:schemaLocation="urn:astm-org:CCR CCR_20051109.xsd"
xmlns="urn:astm-org:CCR">
<CCRDocumentObjectID>2008091400235414</CCRDocumentObjectID>
<Patient><ActorID>PATIENT_1001</ActorID></Patient>
<Actors>
<Actor>
<ActorObjectID>PATIENT_1001</ActorObjectID>
<Person>
<Name><Text>Doe</Text></Name>
<Gender><Text>Male</Text></Gender>
<Photo><File>pat_1001.bmp</File></Photo>
</Person>
</Actor>
</Actors>
</ContinuityOfCareRecord>
My stylesheet looks like this:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl=" xmlns:a="urn:astm-org:CCR" xmlns:date=" exclude-result-prefixes="a date">
<xsl
<xsl
<xsl:template match="/">
<html xmlns:date="<table id="demographics" class="list" width="50%">
<td>
<br/>
<body>
<tbody>
<tr>
<th>Name</th>
<th>Gender</th>
<th>Photo</th>
</tr>
<xsl:for-each select="a:ContinuityOfCareRecord/a
<xsl:variable name="objID" select="a:ActorID"/>
<xsl:for-each select="/a:ContinuityOfCareRecord/a:Actors/a:Actor">
<xsl:variable name="thisObjID" select="a:ActorObjectID"/>
<td>
<xsl:value-of select="a
</td>
<td>
<xsl:value-of select="a
</td>
<td valign="top" width="100">
<img datasrc="#demographics" datafld="File" border="0" alt="Patient Photo" /> <!-- this is the line with the problem -->
</td>
</xsl:for-each>
</xsl:for-each>
</tbody>
</body>
</td>
</table>
</html>
</xsl:template>
</xsl:stylesheet>