Tuesday, June 24, 2008

"Invalid URI: The Uri scheme is too long" - now that's a peculiar message. I got it while doing some Xslt transformations. It comes out that XslCompiledTransform can't just read any xml and transform it. There are issues if Uri scheme is too long. What is too long? Can't really tell, since mine wasn't THAT long.

The following code did not work for me:

XslCompiledTransform xsl = new XslCompiledTransform();
xsl.Load("t.xsl");
XmlWriter writer = XmlWriter.Create("dest.xml");
xsl.Transform(File.ReadAllText("source.xml"), writer);

So I had to use this one:

XslCompiledTransform xsl = new XslCompiledTransform();
xsl.Load("t.xsl");
using (XmlWriter writer = XmlWriter.Create("dest.xml"))
{
    using (XmlReader reader = XmlReader.Create("source.xml"))
    {
        xsl.Transform(reader, writer);
    }
}

The problem is the Transform method and File.ReadAllText that returns the whole source xml string at once. XslCompiledTransform just can't handle it for some reason.

Monday, October 19, 2009 5:06:00 AM (Central European Standard Time, UTC+01:00)
Greeting. An idealist is one who, on noticing that a rose smells better than a cabbage, concludes that it will also make better soup.
I am from Tonga and now study English, please tell me right I wrote the following sentence: "The parties not made demographic approaches doing fora among the applicable parish and among others of the cause.For this jurisdiction the territorial territory of settlements has been allowed in province to three tenants on which the miasto has led: number flows of payments writing the agreements, literary people and routes medieval to the buildings and staff edges."

Best regards :o, Bingham.
Tuesday, December 15, 2009 10:38:37 PM (Central European Standard Time, UTC+01:00)
XslCompiledTransform.Transform(string inputUri, XmlWriter writer) actually considers the inputUri to be a uri! Not the contents of the input. You could have used:
xsl.Transform("source.xml", writer);

Cheers!
Tuesday, July 13, 2010 3:36:05 AM (Central European Standard Time, UTC+01:00)
Hello everybody, today really lucky
To introduce you these good online shops now!

Sale: GUCCI Bags, GUCCI Handbags, GUCCI Shoes, GUCCI Clothes, GUCCI Glasses, etc.
http://www.gucciboss.com/

2010 NFL, NFL Jerseys, NFL Jersey, NHL Jerseys, MLB Jerseys, NBA Jerseys, wholesale NFL Jerseys
http://www.2010-nfl.com/


Vibram,Five Fingers,fivefingers,Five Fingers Kso,Five Fingers Classic,Five Fingers Sprint,FiveFingers shoes,Vibram Outlet Sale
http://www.topfivefingers.com/

Christian Louboutin,Christian Louboutin shoes,Christian Louboutin sale,ChristianLouboutin Boots,Christian Louboutin Pumps,Christian Louboutin Sandals
http://www.superchristianlouboutin.com
Thursday, August 26, 2010 8:29:17 AM (Central European Standard Time, UTC+01:00)
http://www.gucciall.com
Discount Gucci, Discount Gucci Handbags, Gucci Sunglasses

http://www.wholesale-ugg-boots.com
UGG, UGG Boots, cheap UGG Boots

http://fivefingersshoes.tk
http://mychristianlouboutin.tk
http://ghdstraighteners.tk
http://kidsjerseys.tk
http://ghdshopping.tk
http://guccigucci.tk
http://saleshoes.tk
http://thehandbags.tk


http://ilikehandbags.tk
http://ilikejerseys.tk
http://isshoes.tk
http://rarehandbags.tk
http://rarejerseys.tk
http://rareshoes.tk
http://sellhandbags.tk
Name
E-mail
Home page

Comment (Some html is allowed: a@href@title, strike) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.  

Enter the code shown (prevents robots):

Live Comment Preview