.NET & XSLT: Unwanted namespace in resulting file after using extension objects

Hello,
after using extension objects in the stylesheets there's an additional
namespace entry in the resulting file.
How can I prevent that?
See:

..NET/C#:

XslCompiledTransform xslt = new XslCompiledTransform();
....
XsltArgumentList xsltArgs = new XsltArgumentList();
xsltArgs.AddExtensionObject("ibd:DanTe", this);
....
xslt.Transform( _source, xsltArgs, target );

XSLT:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/
Transform" xmlns:ibd="ibd:DanTe">

  <xsl:output method="xml" version="1.0" encoding="UTF-8" omit-xml-
declaration="no" indent="yes"/>

  <xsl:template match="/">
    <tr:TestRunsRoot xmlns:tr="blabla">
....
    </tr:TestRunsRoot>
  </xsl:template>
</xsl:stylesheet>

results in:

<?xml version="1.0" encoding="utf-8"?>
<tr:TestRunsRoot xmlns:tr="blabla" xmlns:ibd="ibd:DanTe">
....
</tr:TestRunsRoot>

How do I get rid of the additional namespace entry
xmlns:ibd="ibd:DanTe" ???

Thanx in advance.
0
2/11/2010 7:48:00 AM
dotnet.xml 7266 articles. 0 followers. Follow

1 Replies
704 Views

Similar Articles

[PageSpeed] 46

On Feb 11, 8:48=A0am, "ib.dangelm...@googlemail.com"
<ib.dangelm...@googlemail.com> wrote:
> Hello,
> after using extension objects in the stylesheets there's an additional
> namespace entry in the resulting file.
> How can I prevent that?
> See:
>
> .NET/C#:
>
> XslCompiledTransform xslt =3D new XslCompiledTransform();
> ...
> XsltArgumentList xsltArgs =3D new XsltArgumentList();
> xsltArgs.AddExtensionObject("ibd:DanTe", this);
> ...
> xslt.Transform( _source, xsltArgs, target );
>
> XSLT:
>
> <?xml version=3D"1.0" encoding=3D"UTF-8"?>
> <xsl:stylesheet version=3D"1.0" xmlns:xsl=3D"http://www.w3.org/1999/XSL/
> Transform" xmlns:ibd=3D"ibd:DanTe">
>
> =A0 <xsl:output method=3D"xml" version=3D"1.0" encoding=3D"UTF-8" omit-xm=
l-
> declaration=3D"no" indent=3D"yes"/>
>
> =A0 <xsl:template match=3D"/">
> =A0 =A0 <tr:TestRunsRoot xmlns:tr=3D"blabla">
> ...
> =A0 =A0 </tr:TestRunsRoot>
> =A0 </xsl:template>
> </xsl:stylesheet>
>
> results in:
>
> <?xml version=3D"1.0" encoding=3D"utf-8"?>
> <tr:TestRunsRoot xmlns:tr=3D"blabla" xmlns:ibd=3D"ibd:DanTe">
> ...
> </tr:TestRunsRoot>
>
> How do I get rid of the additional namespace entry
> xmlns:ibd=3D"ibd:DanTe" ???
>
> Thanx in advance.

Seems like

exclude-result-prefixes=3D"ibd" in <xsl:stylesheet ... >

will do the trick ... Thanx anyway.
0
oe63oe25 (2)
2/12/2010 6:15:37 AM
Reply:

Similar Artilces:

C#.net click event associated with database error
I would like to know what to do to solve the problem listed below: When I am debugging a C#.Net 2008 windows application and click on the 'next' button, I am getting the following error: 'An unexpected error has occurred. The 'Microsoft.jet.oledb.4.0'provider is not registered on the local machine'. I think that I may need to change some setting I have in the visual studio.net 2008 professional edition to solve this problem prior to clicking on the 'next' button. I am working on an workstation that is 64 bits, XP operating syste...

net passport
I changd my net passport and now when I enter it in money it tells me it is incorrect. ...

how do I lock a field in a form and use for look up value only?
How do I lock a field in a form, yet still be able to look up value in this field? Could you define your terms a bit more? I'm not sure what you are trying to accomplish... Regards Jeff Boyce Microsoft Access MVP -- Disclaimer: This author may have received products and services mentioned in this post. Mention and/or description of a product or service herein does not constitute endorsement thereof. Any code or pseudocode included in this post is offered "as is", with no guarantee as to suitability. You can thank the FTC of the USA for making this disc...

Need help! I cannot open an excel file
I cannot open an excel file which I moved to a new folder and renamed. This error message appeared: "path://filename.xls could not be found. Check the spelling of the filename, and verify that the file location is correct. If you are trying to open the file from your list of most recently used files on the File menu, make sure that the file has not been renamed, moved, or deleted. yumm2dmax wrote: > I cannot open an excel file which I moved to a new folder and renamed. This > error message appeared: > > "path://filename.xls could not be found. Check the spel...

Windows File Share
Hi, In our org folder share is blocked from one computer to another. Pls guide me a small to share the files between the machines in the LAN. OS : Windows XP Thanks in Advance. Regards, Maghesh "MS Office Outlook Error" <MSOfficeOutlookError@discussions.microsoft.com> wrote in message news:FB76DE6F-0289-4483-BD89-A6F714298059@microsoft.com... > Hi, > > In our org folder share is blocked from one computer to another. Pls guide > me a small to share the files between the machines in the LAN. > > OS : Windows XP > > Thanks in Ad...

Insert outlook mails as attachemnt without inserting as object
Hi i have a problm while inserting a outlook mail in excel sheet. every time i have to go to Insert>oject> and then brows the location where it is to be inserted. Is there any other less time consuming way of attaching any mail in excel sheet ...

weird report result
Hi everyone I've made a simple report but with just the objects on the footer section. 12 lines each one with 13 objects, like an anual report. So far so good. It shows me all the way i want. But i would like to add 8 lines more with another 13 objects per line. The weird thing is that, it adds my first page in blank. Completly in blank. Nothing. the 2nd page with the results and 3rd page also good. But there's a first page in blank. Never saw that. Can anyone hekp me please? Tks in advance Pedro Pedro wrote: >I've made a simple report but with just the objects...

Apply Log File
Hi, I did a tape restore of First Storage Group and the state is "Clean Shutdown" How do I apply those log files back to the storage group that were generated after the backup? Thanks, Gabriel http://support.microsoft.com/kb/296788/en-us Make sure they're all there and consistent, then start the IS and they will roll forward. "Gabriel Chua" <glchua@singnet.com.sg> wrote in message news:exh%23yCvhHHA.4772@TK2MSFTNGP05.phx.gbl... > Hi, > > I did a tape restore of First Storage Group and the state is "Clean > Shutdown" > How do...

net
Dear All , Can you please help in this i'm creating excel sheet for finance purpose and i need the number appear with color for example if the net = +ve (i need it to appear with green color ) and if it is = - neg (i need to appear with red color ) any one can help me with the color thansk for your cooperations -- bn_dubai ------------------------------------------------------------------------ bn_dubai's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=29568 View this thread: http://www.excelforum.com/showthread.php?threadid=492656 You can use Con...

MFC and .NET
We have a MFC application we are moving to VC 7.0 because we want to use the latest C++ compiler that comes with it. For moving to VC 7.0 we need to install the .NET framework though. My questions are, 1. Has anybody moved thier MFC application to .NET framework? Did you run into any issues? 2. What is the plan for MFC? Is there any end of life for this from Microsoft? Thanks, David I use all of my VC6 MFC apps and DLLs just fine with XP and VS.Net 2003. No need to port your code to .Net at all. WTH "David Mohandas" <david_mohandas@yahoo.com> wrote in message news:ac...

how to enter date without using "/" each time?
How do I enter a date in a cell without having to push the "/" between the month, day, and year? If you just don't like that character, use the dash (-) instead. Anything else is probably more complicated and time consuming than it's worth. Excel needs to know where to 'draw the line' between day, month & year. LOL |:>) "magstate" wrote: > How do I enter a date in a cell without having to push the "/" between the > month, day, and year? Using VBA code. Chip Pearson has the code. http://www.cpearson.com/excel/DateTimeEntry.ht...

how to tell what users are not using exchange default storage limi
Hi, Any way I can tell which Exchange mailboxes have been set to not use the Mailbox Store defaults for storage limits? Thanks Run a query against the following AD attribute "mDBUseDefaults" That is set to true for users who use the IS default and false for those users who have set limits. If any of the "mDBOverHardQuotaLimit", "mDBOverQuotaLimit" or mDBStorageQuota" attributes contain numbers (KB) then that's another indicator that they have manually configured limits. "markj" <markj@discussions.microsoft.com> wrote in message new...

VB.net
Hi, I am trying to update a field in a record of a Access Database (whose structure I can not modify). I got this error (translated from italian): "Data types do not match in the expression" = "Tipi di dati non corrispondenti nell'espressione criterio." The code is the following: (myField is a binary field as on Access 2007) 'determine new value Dim newValue() As Byte = ... (valid data) 'write new attributes Dim conn As OleDbConnection = myObj.getConnection Dim cmd As OleDbComman...

Authentication between asp.net 2.0 and asp.net 1.1
I am running CRM 3.0 which is running in its own app pool for asp.net 1.1. I've added a virtual directory under the CRM website which runs under a different app pool for asp.net 2.0. This is where I put my custom web pages. Both app pools are running under the NETWORK SERVICE account. Both the CRM website and the virtual directory has windows authentication. My question is why I am prompted to enter my credential when I access the custom page through CRM the first time I access the page? Have I not already been authenticated? Hmm not sure whether this can help. Are you sure you put...

Object Browser
In the Object Browser, the Classes and Members panels display correctly. However, when I select an object or member and click on Help (i.e. the yellow ?), an Excel Developer screen is displayed, not a list of topics associated with the selected object/member. Entering a term in the search box of the Excel Developer window generates a response that "No results returned for ....". It appears the program has lost the ability to access the Object Browser help facility. Would appreciate any suggestions on how to restore it. Thanks in advance for any assistance. Hi T...

File Converter for Word 2003
Is there a file converter that you can add to Word 2003 in order to read later Word files, like 2007 files? I am getting error messages. Download and install the Microsoft Office Compatibility Pack for Word, Excel, and PowerPoint File Formats. Pam removing all headers and footers wrote: >Is there a file converter that you can add to Word 2003 in order to read >later Word files, like 2007 files? I am getting error messages. -- Message posted via http://www.officekb.com The download site is http://www.microsoft.com/downloads/details.aspx?familyid=941b3470-3ae9-4aee...

SQL connection management in ASP.Net
hi, I have to create a small website in ASP.Net 2.0. I have question about working with SQL connections. What are the best practises? How and where to create and store a connection? I see a few possibilities: - create, open/close a connection on each web page - create a connection on login page and store it on Session - how to create a connection? ie. SqlConnection = new SqlConnection or System.Data.Common.DbProviderFactory factory = System.Data.Common.DbProviderFactories.GetFactory("System.Data.SqlClient"); System.Data.Common.DbConnection conn = factory.Crea...

File Association problem in Win7
Folks, In Windows 7 (on a 64-bit Acer laptop), when I try to associate a file with a program, I click Start, "Default Programs", "Associate a file type with a program", then choose the file type from a long list of possible types. The snag is that the types that I want to associate with my favorite editor are not in the list - surprisingly, as they are ".c", ".h", and less surprisingly, a file type that is created by a program I wrote, ".Prs" Can anybody suggest how I can make the associations? Do I have to edit the registry? ...

HELP!! Accidently saved file... need to recover first one!! :(
OK... so I had excel file open and did something I shouldn't have... then like an idiot, I hit save and closed excel... DOH I screwed up... is there any way to locate the document in the guts of my computer prior to having saved over it? Is there an archive of some sort that I can recover my good document prior to having saved over it? Please please please? Thanks Sorry, but without a backup It's likely gone. If you are at work and it was on a network drive and they back up like they should, then ask them to get you a copy. -- Regards Ken........................

Recovering Deleted Exchange files
My former employer uses Exchange and today they de-activated my account. When I was updating the delivery location for emails, I accidentally deleted the Exchange Account. I have all but the last month of emails backed up and I'm wondering if there's a way to restore those emails from a "temp folder" or somewhere else on the local drive. Thanks! If you only deleted the account from your profile, you can use system restore to roll bac to before you deleted it, then move the messages to a pst and delete the account. -- Diane Poremsky [MVP - Outlook] Out...

FREE .NET EBOOKS , DOTNET TUTORIALS, CODE SNIPPETS
Visit this site u will find good .Net ebooks, .Net source code, .net tutorials and lots more for vb.net, c#.net, asp.net and other dotnet stuff. URL: www.DotNetGuide.net I don't like the site because 1) There are 3 sets of adverts on each page 2) The page is fixed with, which is very annoying. I am reading on a wide-screen laptop but find I am limited to approximately 60 characters per line, I can't read articles like that! Pete ...

unknown cab file required
I just installed Project 2003 and immediately ran the update routine. Office Update tells me that it has SP1 for Project and some new junk mail filters for Outlook 2003. I tell it to download both patches. Download proceeds with no problem. Installation tells me that it cannot find a file called SKU111.CAB. I search all local hard disks - no file. I search the Project disk - no file. I search the Office 2003 disk - no file. I even searched the Publisher 2003 disk (which is not installed). I can account for an SKU13B and an SKU119, but no SKU111. I search all of Microsoft.com - nothing e...

xml DTD visual stdio .net 2k3 autocomplete
Hello, I'm using visual studio .net 2k3 to work with Xml intensive integration App. When I using XML /XSD based documents I get autocomplete feature but not when I use Xml /Dtd based. Somebody know How work around Thansk Alejandro P. ? <alejandropacheco@hotmail.com> wrote in message news:esj0OEWYEHA.2972@TK2MSFTNGP12.phx.gbl... > Hello, > > I'm using visual studio .net 2k3 to work with Xml intensive integration > App. When I using XML /XSD based documents I get autocomplete feature but > not when I use Xml /Dtd based. Somebody know How work around > >...

How do I delete recently used files on the file menu in Publisher.
You can set the number of recently used files in Word. Is this possible in Publisher 2000? Can I set it so it doesn't save them to the file menu? Kater Here wrote: > You can set the number of recently used files in Word. Is > this possible in Publisher 2000? Can I set it so it > doesn't save them to the file menu? ================================= After you read the following article you may decide the MRUs are not so bad after all. (313454) HOW TO: Clear the Most Recently Used List ( MRU) in Office Programs http://support.microsoft.com/?kbid=313454 -- John Inzer retur...

ASP.Net
Hi, I have a few questions about ASP.Net, as I've been using it for a while but my knowledge of the "big picture" is patchy in some areas. Any help would be appreciated... - Where is the line between "native" language features (e.g. in JScript), and those features which are part of .Net (or whatever), common to all .Net languages? Or put another way, how are the .Net facilities "mapped" onto a particular language? (I'm sorry of this question is somewhat vague...) - In a closely-related matter, do any languages have issues accessing the full A...