473,386 Members | 1,773 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 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 1708
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.