XslTransform

T

TomislaW

I am using XslTransform.Transform method

to transform xml to html. In html I get:

<?xml version="1.0" encoding="utf-8"?> tag before transformed html, how to
get rid of this tag?

Also I have message in VS:

'You should pass XmlResolver to Transform() method' why do I need that?
 
D

Derek Harmon

[I've changed Followup-To the microsoft.public.dotnet.xml newsgroup,
question is more XML-related than ASP.NET-related.]
: :
<?xml version="1.0" encoding="utf-8"?> tag before transformed html, how to get rid of this tag?

In your stylesheet beneath your <xsl:stylesheet ... /> element you should place
an <xsl:eek:utput ... /> tag that directs XslTransform to not emit an XMLDecl.

Also I have message in VS:

'You should pass XmlResolver to Transform() method' why do I need that?

In .NET 1.1, the signature of the Transform( ) method changed to encourage
developers to pass an XmlResolver.

An XmlUrlResolver is implemented for you by the framework - but any
other sorts of resource resolution requires that you implement your own
XmlResolver (UNC network shares requiring Credentials, embedded
resources built into your assemblies, etc.) Some XSLT features like
document( ) or xsl:include could need to resolve these references.

If you don't want to implement an XmlResolver just pass null and a default
implementation will be used automatically.


Derek Harmon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,117
Latest member
Matilda564
Top