473,769 Members | 3,305 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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(filena me) 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 1750
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!P LEASEtkachenko. com> wrote in message
news:eT******** ******@TK2MSFTN GP10.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!P LEASEtkachenko. com> wrote in message
news:eT******** ******@TK2MSFTN GP10.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
4394
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 XSLT which will create my HTML. Here's what I have for the basic transformation: #!/usr/local/bin/perl use XML::XSLT;/
2
9404
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> .... </mydoc>
1
3109
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 Transformer convert that via XSLT to valid XSL-FO. So I define a SAXReader which fires the SAX Events for the Java Object. This works fine and the Transformation to PDF is ok. However, I have one object which contains an XHTML String and the tags
3
1788
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 <mySchema rdf:resource='fred' />
3
1760
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 and attributes from the source XML into the output using simple "identity" like XSLT: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="xml" indent="yes"/>
3
302
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 transformed) doesn't. In the transform file I load the 2nd XML file which contains
4
2097
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 this? Thanks again WStoreyII
6
2656
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 "database frontend" type of intranet application. The existing table-display code consists of a mountain of very clever but extremely brittle spaghetti-javascript, which I'm planning to replace with XSLT transformations. At present I'm still...
8
15902
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 case that i don't know how to solve, I need to concat a string from multiple childs into a standard way, the following is an example of the source and the target XML.
0
10049
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9997
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9865
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8873
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7413
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6675
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5310
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3965
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.