473,320 Members | 1,870 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,320 software developers and data experts.

Transfrom() issues with xsl:document() function

I'm getting a strange result when I reference an external
xml document in my XSLT. The transformation work's fine in
Xselerator, but not in .NET. It looks as though I'm
getting garbage in the output. Here's the relevant portion
of the xslt:

<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output omit-xml-declaration="yes"/>
<xsl:variable name="xmlDataset" select="document
('file:\\C:\dataset.xml')"/>

<xsl:template match="/">
<Record>
<DataFields>
<DataField Value="0001"/>
<DataField>
<xsl:attribute name="Value">
<xsl:value-of
select="$xmlDataset//Table/Company_Name"/>
</xsl:attribute>
</DataField>
</DataFields>

<xsl:apply-templates select="//Table"/>
</Record>
</xsl:template>

The results from the input file are fine, but the result
of the select="$xmlDataset//Table/Company_Name" which
references the external document looks like this:

<DataField Value=\"admin\t&#xD;&#xA;\t\t\t\t\t\t\Test
Company">
</DataField>

The 'Test Company' is correct, but what's up with all of
the stuff before that? Like I said, it works fine in
Xselerator using MSXML4.
Nov 12 '05 #1
2 1420
Found my problem. The answer isn't even worth posting.
Nov 12 '05 #2
Found my problem. The answer isn't even worth posting.
Nov 12 '05 #3

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

Similar topics

2
by: Peter Gerstbach | last post by:
Hello, I need help on the new xsl:document element! I'm using XSLT version 1.1 to be able to use the <xsl:document> element, because I need more than 1 output files. I'm using Saxon 6.5.3 My...
0
by: schaf | last post by:
Hi ! I'm writing a new xsl:function, which uses two other functions. But by the call of the first function, it would be abort just after the call. Not even the xsl:param would be set. I don't...
1
by: Papastefanos Serafeim | last post by:
I want to use the <xsl:document> XSLT command with xalan, but I get the following error message -------- XSLT Error (javax.xml.transform.TransformerConfigurationException):...
0
by: Daniel | last post by:
how to make sure a xsl document has valid xsl syntax? i tried loading it into an xml document but that doesnt show syntax errors inside attributes such as "foo/bar" vs "bar\foo"
1
by: Daniel | last post by:
in C# how do i transform an xml document with an xsl document when my xml document is a string and my xsl document is a string? the msdn examples only show how to do it with steams and files. in my...
1
by: news.microsoft.com | last post by:
I am writing an XSL file to load a node set with XSL document() function with the syntax as follows: <xsl:variable name="var1" select="document('..\res\xmlfile.xml')/Accounts"/> Unfortunately it's...
1
by: Daniel | last post by:
in C# how do i transform an xml document with an xsl document when my xml document is a string and my xsl document is a string? the msdn examples only show how to do it with steams and files. in my...
1
by: IanK | last post by:
I have a file called product.xml as follows: <products> <product name="Maxi-ISA" friendlyname="Isa" /> <product name="PEP" friendlyname="Personal Equity Plan" /> <product name="General"...
3
by: Petterson Mikael | last post by:
Hi, I was running the following in Netbeans 5.5: sing com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl - default JRE XSLT processor. Creating output/NcmiSigTest.java Unsupported...
1
by: David | last post by:
First of all, yes we are still using classic ASP, lol. I have a XSL document that is reading in info from a XML file. I have to display serveral server side dates on the page. Is there anyway to...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.