472,356 Members | 2,079 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,356 software developers and data experts.

Same XML/XSLT doesn't transform the same - IE6 parser vs. .NET framework parser

Hi,

I have 2 XML files and 1 XSLT file.
The second XML file has the following declarative 1st line:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

....the 1st one (the one to be transformed) doesn't.

In the transform file I load the 2nd XML file which contains
a load of language lookups.

The transform then proceeds to output the 1st XML file
as-is, except it replaces certain attribute values with a value
in the documnet(filename) loaded XML.

Problem:

- If I alter the 1st XML file to include a reference to the XSLT
and the XSLT so that attributes are output as plain text and then
load it into IE6 SP1, then it works and certain attribute values
have been replaced.

BUT
- If I use .NET using the same XML and XSLT files, (except
the 1st XML file doesn't reference the XSLT) and do the
transform in code then it doesn't work. i.e the attribute values
that should be replaced aren't

I think it may have something to do with namespaces as, I
think(?), .NET is stricter, but I'm not sure.

Any help would be much appreciated.

Regards,
Peter
Jul 21 '05 #1
4 1651
Peter Row wrote:
- If I use .NET using the same XML and XSLT files, (except
the 1st XML file doesn't reference the XSLT) and do the
transform in code then it doesn't work. i.e the attribute values
that should be replaced aren't


That might be due to zillion of reasons. You need to find out what
exactly goes wrong. For instance - make sure 2nd XML is loaded successfully.
--
Oleg Tkachenko [XML MVP, XmlInsider]
http://blog.tkachenko.com
Jul 21 '05 #2
Peter Row wrote:
- If I use .NET using the same XML and XSLT files, (except
the 1st XML file doesn't reference the XSLT) and do the
transform in code then it doesn't work. i.e the attribute values
that should be replaced aren't


That might be due to zillion of reasons. You need to find out what
exactly goes wrong. For instance - make sure 2nd XML is loaded successfully.
--
Oleg Tkachenko [XML MVP, XmlInsider]
http://blog.tkachenko.com
Jul 21 '05 #3
Hi,

Ooops I forgot to mention something....

When the transform happens in .NET the 2nd XML file
loaded by the XSLT via a document() statement does not
appear to be working. No error occurs but the file does
not appear to have been loaded. I know it hasn't been
loaded because in my <xsl:template match="*"> I
added an extra attribute to each element I output from
the original 1st XML file. The value of which is a
count() of the nodes from the document() I read in;
it gives zero.

However as my original post said the same transform
(well except with the attributes output as text instead
of attributes) works when run through the IE6 parser,
it is only when the .NET parser does it that the XSLT
fails to load the 2nd XML file and hence make the
replacements.

Regards,
Peter

"Oleg Tkachenko [MVP]" <oleg@NO!SPAM!PLEASEtkachenko.com> wrote in message
news:eT**************@TK2MSFTNGP10.phx.gbl...
Peter Row wrote:
- If I use .NET using the same XML and XSLT files, (except
the 1st XML file doesn't reference the XSLT) and do the
transform in code then it doesn't work. i.e the attribute values
that should be replaced aren't
That might be due to zillion of reasons. You need to find out what
exactly goes wrong. For instance - make sure 2nd XML is loaded

successfully. --
Oleg Tkachenko [XML MVP, XmlInsider]
http://blog.tkachenko.com

Jul 21 '05 #4
Hi,

Ooops I forgot to mention something....

When the transform happens in .NET the 2nd XML file
loaded by the XSLT via a document() statement does not
appear to be working. No error occurs but the file does
not appear to have been loaded. I know it hasn't been
loaded because in my <xsl:template match="*"> I
added an extra attribute to each element I output from
the original 1st XML file. The value of which is a
count() of the nodes from the document() I read in;
it gives zero.

However as my original post said the same transform
(well except with the attributes output as text instead
of attributes) works when run through the IE6 parser,
it is only when the .NET parser does it that the XSLT
fails to load the 2nd XML file and hence make the
replacements.

Regards,
Peter

"Oleg Tkachenko [MVP]" <oleg@NO!SPAM!PLEASEtkachenko.com> wrote in message
news:eT**************@TK2MSFTNGP10.phx.gbl...
Peter Row wrote:
- If I use .NET using the same XML and XSLT files, (except
the 1st XML file doesn't reference the XSLT) and do the
transform in code then it doesn't work. i.e the attribute values
that should be replaced aren't
That might be due to zillion of reasons. You need to find out what
exactly goes wrong. For instance - make sure 2nd XML is loaded

successfully. --
Oleg Tkachenko [XML MVP, XmlInsider]
http://blog.tkachenko.com

Jul 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Neal | last post by:
I need to know how to pass a parameter from PERL to an XSLT when using that XSLT to transform XML. For instance, I'd like to pass a paramter that I retrieve from the queryString and pass it into...
2
by: Pavel | last post by:
Greetings to all - I'm having a problem processing xml with relative dtd URI specified using XSLT: <?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE mydoc SYSTEM "my.dtd"> <mydoc> .......
1
by: Jens Mueller | last post by:
Hi there, this is a Java-XML Question, so I am not sure whether this is the right place, haven't found anything better .... I try to convert a Java object to XML via SAX and let the FOP...
3
by: Paul Hatcher | last post by:
Hi Is it possible to control the node style that XslTransform uses to output XML? I'm trying to convert a file from XML to RDF and if I do the transform in XmlSpy I get the following ...
3
by: Alex | last post by:
I stumbled upon this while developing a custom XPathNavigator. It appears that copy action for attributes is broken in the .net framework XSLT processor. The intent was to just copy the entities...
3
by: Peter Row | last post by:
Hi, I have 2 XML files and 1 XSLT file. The second XML file has the following declarative 1st line: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> ....the 1st one (the one to be...
4
by: WStoreyII | last post by:
I wish to know how to set it up so that when an xml webservice is called that instead of displaying the xml in the browser it will render it with a xslt file the problem is i dont know how to do...
6
by: Pete Verdon | last post by:
Summary: Can I do an XSLT transform, in the client, of a tree of nodes taken from the displayed page DOM in IE? This works in Firefox. Hi, I'm just starting the process of rewriting part of a...
8
by: Hercules Dev. | last post by:
Hi all, I'm new in xslt and xpath, so my question might be simple but i'm learning. I have an XML document and need to transform it into another XML, I use xslt and it works, but there is a...
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
1
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. header("Location:".$urlback); Is this the right layout the...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and credentials and received a successful connection...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
0
by: Ricardo de Mila | last post by:
Dear people, good afternoon... I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control. Than I need to discover what...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.