April 11th, 2011, 03:50 AM
Join Date: Apr 2011
Time spent in forums: 2 h 42 m 12 sec
Reputation Power: 0
split from http://forums.devshed.com/showthread.php?t=77694 --requinix
Hello I'm new to this Forum!
I'm currently also trying to embed XSL directly into an XML file - so far so good. I also tried the examples mentioned above. My problem is the following. But first the sample code here:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type='text/xsl' href='#test'?>
<!DOCTYPE target [<!ATTLIST xsl:stylesheet id ID #REQUIRED>]>
<xsl:stylesheet id="test" xmlns:n1="urn:asdf" version="1.0" xmlns:xsl="W3 XSL Transformation">
<title>This is the title</title>
The example works fine in Safari 5 but not in Firefox 4. Well in Firefox it shows "This is the title" twice, but without formatation. Interestingly, if I remove the xmlns="urn:asdf" and xmlns:n1="urn:asdf" everthing works quite fine - in Safari and Firefox. However nothing is presented if I write xmlns="urn:asdf" in the target-Tag and the xsl:stylesheet-Tag.
Anyway why is it necessary to define xmlns for the XML and the XSL even if it's the same? Why do I have to add ":n1" for the xmlns in the stylesheet? And why is there no problem at all, when I remove both xmlns instructions?
I would be grateful for any help. Thank you.
Last edited by requinix : April 11th, 2011 at 03:52 PM.