[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Dear list-members,
I've problems with viewing an XML file with XSL in an Internet Explorer. I've read the XPath 2.0 and XSLT standards, and I know that if I have unprefixed namespace in an XML schema I should use xpath-default-namespace in the XSL file. Could you just explain me exactly where to put (and how) this? How could I solve the problem?
I have a version, but is doesn't work... The value of "value-of select=..." doesn't appear on the screen...
XML file (xmlns="http://mireg.org/schema/1.0/"):
XSL file:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0"
xpath-default-namespace="http://mireg.org/schema/1.0/"
xmlns="http://mireg.org/schema/1.0/"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://mireg.org/schema/1.0/ http://mireg.org/model/XSD/metadata.xsd">
<xsl:template match="/" xpath-default-namespace="http://mireg.org/schema/1.0/">
<html>
<body>
<p>
Text
</p>
<table border="1">
<xsl:for-each select="metadata/mireg">
<tr>
<td>
<b>Title</b>
</td>
<td>
<xsl:value-of select="dc:title"/>
</td>
</tr>
...
Thanks in advance!
Aron
[xsl] Unprefixed namespace and XSL
Subject: [xsl] Unprefixed namespace and XSL From: "Szabó Áron" <aron@xxxxxxxxx> Date: Wed, 10 Nov 2004 10:19:47 +0100 |
Dear list-members,
I've problems with viewing an XML file with XSL in an Internet Explorer. I've read the XPath 2.0 and XSLT standards, and I know that if I have unprefixed namespace in an XML schema I should use xpath-default-namespace in the XSL file. Could you just explain me exactly where to put (and how) this? How could I solve the problem?
I have a version, but is doesn't work... The value of "value-of select=..." doesn't appear on the screen...
XML file (xmlns="http://mireg.org/schema/1.0/"):
<?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="standard_mireg.xsl"?> <metadata xmlns="http://mireg.org/schema/1.0/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://mireg.org/schema/1.0/ http://mireg.org/model/XSD/metadata.xsd" about="..."> <mireg> <dc:title> ... </dc:title> ... </mireg> </metadata>
XSL file:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0"
xpath-default-namespace="http://mireg.org/schema/1.0/"
xmlns="http://mireg.org/schema/1.0/"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://mireg.org/schema/1.0/ http://mireg.org/model/XSD/metadata.xsd">
<xsl:template match="/" xpath-default-namespace="http://mireg.org/schema/1.0/">
<html>
<body>
<p>
Text
</p>
<table border="1">
<xsl:for-each select="metadata/mireg">
<tr>
<td>
<b>Title</b>
</td>
<td>
<xsl:value-of select="dc:title"/>
</td>
</tr>
...
Thanks in advance!
Aron
---------------------------------------------------- Aron Szabo, M. Sc. Research Associate, Center of Information Technology Budapest University of Technology and Economics
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] for i = 1 to 10, or while, Andrew Welch | Thread | RE: [xsl] Unprefixed namespace and , Jarno.Elovirta |
RE: [xsl] for i = 1 to 10, or while, Steven Reddie | Date | RE: [xsl] Unprefixed namespace and , Jarno.Elovirta |
Month |
Keywords