I'd like to see if someone found a natural explanation to this. I have
this method for transforming docs:
/**
* Transforms an XmlDocument object with an XSL file, and returns
* another XmlDocument object. If something bad happens, null is
* returned instead.
*/
private XmlDocument Transform (string xml, string xsl)
{
try
{
XmlDocument xmlDocIn = new XmlDocument();
xmlDocIn.Load(x ml);
XslTransform transformer = new XslTransform();
transformer.Loa d(xsl);
XmlDocument xmlDocOut = new XmlDocument();
xmlDocOut.Load( transformer.Tra nsform(xmlDocIn , null, new
XmlUrlResolver( )));
return xmlDocOut;
}
catch
{
return null;
}
}
Some stylesheets are calling other documents, so I need the resolver to
work. And it works fine when I run this as a standalone app:
using System;
using System.Xml;
using System.Xml.XPat h;
using System.Xml.Xsl;
namespace XslTest3
{
class Test
{
[STAThread]
static void Main(string[] args)
{
XmlDocument xmlDocResult = Transform(args[0], args[1]);
xmlDocResult.Sa ve(args[2]);
}
private static XmlDocument Transform (string xml, string xsl)
{
try
{
XmlDocument xmlDocIn = new XmlDocument();
xmlDocIn.Load(x ml);
XslTransform transformer = new XslTransform();
transformer.Loa d(xsl);
XmlDocument xmlDocOut = new XmlDocument();
xmlDocOut.Load( transformer.Tra nsform(xmlDocIn , null,
new XmlUrlResolver( )));
return xmlDocOut;
}
catch
{
return null;
}
}
}
}
But when I paste *exactly* the same method (just removing "static") into
my main app, the resolver stops working! The transformation works, but
no data from the documents called from stylesheets come out.
Gustaf 0 1091 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: peter greaves |
last post by:
hi everyone
i am having a bad time with an entity resolver. my application uses a
resolver to locally-cache the nested schemas that the basic xsd
includes to a local directory. however i am getting an exception when
the parser tries to parse one of the included xsds which it has
downloaded, because (as far as i can tell from the stack trace) it is
trying but failing to handle other included xsds. the exception is
here:
|
by: Steinar Bang |
last post by:
Platform: Intel PII, debian sarge testing/unstable, Blackdown J2SDK 1.4.0.99beta-1,
ant 1.5.3-1, libxerces2-java 2.4.0-1, libxalan-java 2.4.1-1
Is there a way to make the Xerces-J parser, used as a SAX parser in
Ant, use Norm Walsh's Catalog Resolver for finding DTDs, by just
setting properties with -D command line arguments?
Alternatively, is there a way to make Xerces-J not look for the DTD in
a <DOCTYPE> declaration, by setting...
|
by: Soren Kuula |
last post by:
Hi,
I'm using a catalog for my Docbook xsl transformation. I can see (by
having the resolver dump debug information) that the remapping of the
system identifier
<rewriteURI
uriStartString="http://docbook.sourceforge.net/release/xsl/current"
rewritePrefix="file:../docbook-xsl-1.62.4/"/>
works just fine. However, docbook.xsl refers to other xsl stylesheet
|
by: inetmug |
last post by:
I have read that you can specify only the major/minor numbers (plus token and
culture) to reference a DLL installed in the GAC, and that the resolver will
"upselect" to the dll with the latest build and revision number. Is this
true?
However, when I add references in the compilation section of the web.config
of an ASP.NET app, it can not find the DLL in the GAC unless I give it the
build and revision number. I would rather not do this...
|
by: Pat Buxton |
last post by:
I am transforming xml using XSLTransform which works fine. The xsl
file is stored on eg. C:\temp1 and the xml is loaded from c:\temp2.
All image files referenced in the stylesheet file are stored on the
same path as the stylesheet and are not used in the transform. How do
I use an XMLResolver to transform using the images without having to
move the files, is it possible???
Images are referenced as eg. <img src="image1.gif"/> in the...
| |
by: Frederick Gotham |
last post by:
I have a general idea about how negative number systems work, but I'd
appreciate some clarification if anyone would be willing to help me.
Let's assume we're working with an 8-Bit signed integer, and that it
contains no padding.
Firstly, I realise that the MSB is known as the sign-bit, and that it
indicates whether the number is positive or negative (irrespective of
which negative number system is used).
|
by: sumelong |
last post by:
Hi all,
i have an xsl with params to be parse using c#. I then used
xslArgumentList and XpathNavigator Classes.
I tried the following:
1-trans.transform(doc,params,writer,null). I had am empty result. the
null stands for Resolver.
2-trans.transform(doc,params,writer). It works well
3-trans.transform("input.xml","output.xml"). it works well if i
initialise the params in xsl.
Why is there a problem in step 1? i do not understand the...
|
by: giles.thomas |
last post by:
We're proud to announce that today Resolver One, our flagship
application, entered its public Beta phase. It can be downloaded from
<http://www.resolversystems.com/download/(free registration
required), and we would very much welcome feedback from the Python
community.
Resolver One is a Rapid Application Development tool for analysing and
presenting business data using a familiar spreadsheet interface - or,
to put it another way, it is...
|
by: giles.thomas |
last post by:
We are proud to announce the release of Resolver One, version 1.2 -
the largest IronPython application in the world, we think, at 38,000
lines of production code backed up by 150,000 lines of unit and
functional tests.
Resolver One is a Rapid Application Development tool for analysing and
presenting business data, using a familiar spreadsheet interface
combined with a powerful IronPython-based scripting capability that
allows you to...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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,...
| |
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...
|
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...
|
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();...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |