XslTransform

Discussion in 'ASP .Net' started by TomislaW, Feb 16, 2005.

  1. TomislaW

    TomislaW Guest

    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?
    TomislaW, Feb 16, 2005
    #1
    1. Advertising

  2. TomislaW

    Derek Harmon Guest

    "TomislaW" <> wrote in message news:%...
    [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.

    <xsl:eek:utput method="html" omit-xml-declaration="yes" />

    > 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
    Derek Harmon, Feb 17, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bob Yuan
    Replies:
    1
    Views:
    333
    Michal A. Valasek
    Jul 31, 2003
  2. Natty Gur
    Replies:
    8
    Views:
    303
    Natty Gur
    Nov 5, 2003
  3. Kathy Burke
    Replies:
    10
    Views:
    541
    Kathy Burke
    Nov 4, 2003
  4. George Durzi

    XslTransform in .NET v1.1

    George Durzi, Nov 13, 2003, in forum: ASP .Net
    Replies:
    11
    Views:
    1,652
    Gerald
    Dec 3, 2005
  5. John Holmes
    Replies:
    3
    Views:
    564
    Steven Cheng[MSFT]
    Mar 6, 2004
Loading...

Share This Page