[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Unprefixed namespace and XSL

Subject: Unprefixed namespace and XSL
From: "Szabó Áron" <aron@xxxxxxxxx>
Date: Wed, 10 Nov 2004 10:19:47 +0100
szab ron
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.