Hi Jarkko!
There is a malformness in your details.xml.
You have two <Xdoc>'s but none </Xdoc>'s.
Try running your code (width <img src="{$details/XDoc/firstimage}" />)
with this details.xml:
<?xml version="1.0" encoding="ISO-8859-1"?>
<XDoc>
<firstimage>/kuvat/unproc.jpg</firstimage>
</XDoc>
-----Original Message-----
From: owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
[mailto:owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com] On Behalf Of
Jarkko(_dot_)Moilanen(_at_)uta(_dot_)fi
Sent: Friday, October 18, 2002 11:43 AM
To: xsl-list
Subject: [xsl] probs with document()
Hi!
I have somekind of click in my logic, because I can not
get the src value for the image from external xml file.
Could some one point what seems to be the problem.
XSLT
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" encoding="iso-8859-1" indent="yes" />
<xsl:variable name="details" select="document('details.xml')" />
<xsl:template match="/">
<html>
<body>
<img src="{$details/firstimage}" />
</body>
</html>
</xsl:template>
</xsl:stylesheet>
External details.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<XDoc>
<firstimage>/kuvat/unproc.jpg</firstimage>
<XDoc>
Output:
<html>
<body>
<img src=""></body>
</html>
I really dont know what is wrong.
Cheers
Jarkko
****************************************************************
Jarkko Moilanen "Erehtyminen on inhimillista,
Researcher/ ITCM mutta todella suuret mokat
jm60697(_at_)uta(_dot_)fi vaativat tietokoneen käyttöä."
www.uta.fi/~jm60697
GSM: +358 50 3766 927
****************************************************************
* ITCM | Information Technology and Crisis Management
* http://www.itcm.org
****************************************************************
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list