.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
1844 Views

Similar Articles

[PageSpeed] 48

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:

email publisher file to clients with aol
I'm having difficulty emailing my aol clients with my publisher file as the text of the email. It is completely distorted. Text is bunched together and wordart and graphics are missing. I'm not sure how to fix this problem. -- Tab It is never a good idea to try to send a Publisher creation as an email. Your best solution is to convert the file as a PDF (there are free PDF converters around, www.primopdf.com is one). If you have Publisher 2007 there is a *save as* PDF add-in: Download details 2007 Microsoft Office Add-in Microsoft Save as PDF or XPS https://www.microsoft.com/dow...

Edit XML using ASP.NET
Good afternoon, Quick and what I hope is an easy question... I have an XML file that is holding constant values. On occasion there will be times where some of those values will need to be updated. Is it possible to do this programatically with ASP.NET? As an example, a system status indicator constant is contained in the XML file: <SYS_STAT>No Problems to Report</SYS_STAT> and on those hopefully rare occasions where a problem is found, the "flag" needs to be switched to: <SYS_STAT>Problems reported in Martin Country</SYS_STAT> I have managed to get the...

Net Folders (How?)
This seems exactly what I need to share a few contact and calendar details. Where can I find more about it? * Our server is Windows 2000 Server * Clients are XP and 2000 * E-mail is Outlook and OE (is it an Outlook only component) Do I download it or is it part of the package? Any help would be appreciated. Thanks, Ed Hasted Net Folders was never all that reliable, in my opinion. Besides, Outlook 2002 (XP) doesn't support Net Folders. Check out http://www.slipstick.com/outlook/share.htm for some other solutions. -- PATRICK REED [Outlook - MVP]~~~~~~ -Microsoft Certified Profe...

Problem reading Excel 2003 file through OleDB
Hy everybody, I've got a problem reading an Excel 2003 file in VB.NET. The problem comes when I do a SQL sentence through the Jet engine. If one column in the Excel file contains some numeric values and some string values, only returns the types of the first row that finds, the other data type is returned as NULL value. How can I return al the data types from the column? Here is my SQL sentence: SELECT * FROM [PAGE1$] Thank's. Luismi Can you not use the native SQL engine rather than the Jet engine as that, as you have found this determines the ...

A version of .net framework isn't detected.
After i install .Net Framework 1.1 and then i upgrade to .Net Frame Work 2.0, i still can't install GP Client. The error message is "A version of .Net Framework isn't detected'. Please Help? ...

Using Drop Down Menus Causes Outlook 2003 to freeze
Whenever I attempt to use a drop down menu in Outlook 2003, whether it's the "Insert File" window or the "Save As" window, Outlook freezes and I have to end the task using Task Manager. I can use other means to browse for files and folders within Outlook so I know I'm not have some strange issue with Explorer. I'm at a complete loss here. I've tried running "Dectect and Repair" and my next move will likely be to re-install Office 2003. Any help would be greatly appreciated. ...

How to disable help file generation?
I need to turn off the automatic generation of a help file when compiling. Thanks. Mark Go to the solution explorer. Find the .hpj file. right click on it and bring up the properties. Select yes for exclude form Build. AliR. "Mark F." <replytogroup@news.com> wrote in message news:NxUCe.197871$6g3.139057@tornado.texas.rr.com... > I need to turn off the automatic generation of a help file when > compiling. > > Thanks. > Mark > > What is 'solution explorer'? Using VS 6. "AliR" <AliR@online.nospam> wrote in message news:42dc17...

Is there a way to do batch convertion from .xls fil to .doc file?
Hi all, I need to convert a thousands of files in .xls format into .doc format, retaining the original format as close as possible. Is there any alternate way to do this rather than copying and pasting it page by page? Do I need to use third party software to do this? If yes, any suggestion of what software did this best? Thanks in advance for any suggestion and help. Regards, Alvin See link below if it helps you. http://www.softinterface.com/Convert-XLS/Convert-XLS.htm Regards Jed "alvin" <alvin.lim@samsung.com> wrote in message news:91bc01c4333c$148f5a90$a101280a@...

viewing files in a directory
I would like to run a function I have on all the files in a given directory I looked in the HELP on the Directory class and in the examples they use #using <mscorlib.dll using namespace System using namespace System::IO using namespace System::Collections But when I try to compile, it doesn't know those namespaces And the rest of the script is String* fileEntries[] = Directory::GetFiles(targetDirectory) IEnumerator* files = fileEntries->GetEnumerator() while (files->MoveNext()) //Here I call my functio Is there another way to do this Thanks FindFirstFile/FindNextFi...

Looking for info on using QIF files to automatically update MS Mon
Some time ago I remember reading several posts along the lines that someone was attempting to modify MS Money so that when it initiated an auto update it made itself look like Quicken. It would then translate the QIF into OFX to update Money. I've searched everywhere but can't seem to locate the posts. Before this newsgroup goes away can someone please direct me to this info? My brokerage, Fidelity, doesn't provide a method to initiate data download at their end; it has to be initiated through Money. When auto update goes away next January that means I'd have...

NET 4.0 and NET 3.5
Hello, Does any knows if I can use a class library compiled with NET 3.5 in a Net 4.0 project? Thank You, Miguel shapper wrote: > Hello, > > Does any knows if I can use a class library compiled with NET 3.5 in a > Net 4.0 project? It's ".NET". Not "NET". You don't compile a library with (i.e. using) .NET 3.5. You compile a library with a particular version of a compiler (e.g. C# 3.0). If you're asking whether a library that was compiled to need only .NET 3.5 can still work in .NET 4.0 is installed, well´┐Żsince .NET 4.0 is...

can you create a msg file without outlook installed ?
Hello: I am look for a vb dot.net solution to create a .msg file on the fly (on a server) without having to have outlook installed. The .msg files will be placed in a Document Management repository. Since this is running on IIS7.0 I need a pure dot.net solution. Thanks T The msg-format is described here; http://msdn.microsoft.com/en-us/library/cc463912.aspx There might be some 3rd party libraries for this. You might be better of asking this question in a developer newsgroup own the hall. They all start with outlook.program_ -- Robert Sparnaaij [MVP-Outlook] Coautho...

how can i use radio buttons for more than 1 yes no question
In working with excel I am trying to use a form with 2 yes or no questions. I am using option buttons marked yes and no but when I try clicking on them only 1 of the 4 buttons darkens. I copy and pasted one set and then made a new button and copy and pasted that. but still only one button will darken at a time.I would really like each question maked yes or no I read an earlier post from Jon Peltier and he had the answer all I needed to do was group 1 set of option boxes and all was right with the world. I went ahead and grouped to other set anyway. Thanks Jon "Proto" wr...

Combining the Results of Two Expressions
Hello, I have twelve columns. In each column, I use an expression to calculate revenue for a month. Is there a way to add another expression that sums certain columns? Basically, I want to add a subtotal every three months for "quarter" total and then sum all twelve of the columns for a total for the year. Can I do this in the same query or would it be better to create a new query that calls the first one? Or maybe even have the first query create a temporary table and build the final query off that table (does that make sense)? Thanks! -Nick Nick I may be reading too...

Saving a worksheet as a jpg file?
I know how to save a chart as a jpg file, but I don't know how to save a worksheet as a jpg file. Can anyone tell me how? (The reason I want to do this is to send a worksheet to a Mac user who cannot [and who has no interest in learning how to] open Excel files, but who can open jpg files.) Many thanks. -- ---------- CWLee Former slayer of dragons; practice now limited to sacred cows. Believing we should hire for quality, not quotas, and promote for performance, not preferences. Use the Excel Camera Tool to take a picture of a pre-selected range on a worksheet. Copy the pictu...

problem with opening a money file <WEIRD>
I have used money 2005 for a year. Couple days ago I had to format my hard drive and install Windows XP a new. I saved my money mny file and the backup to it in the safe place. When I installed MS Money on my new system and tryed to open my mny file it displayed this error: --------------------------------------------------------------------- Money cannot locate 'filename' or cannot open it, possibly because it is a read-only file or you do not have permission to change it or your disk drive is write protected. If you have chosen the correct file and it cannot be accessed, you wi...

Using names referencing a cell in another workbook
Cell A1 contains the name (Book) of the source workbook. Cell A2 contains the name (Sheet) of the worksheet in Book containing the desired info. What do I put in cell A3 to get cell B51 from sheet Sheet in workbook Book? Not sure what you're doing over there, but try this: =[Book1.xls]Sheet2!$B$51 -- Ryan--- If this information was helpful, please indicate this by clicking ''Yes''. "jimk" wrote: > Cell A1 contains the name (Book) of the source workbook. Cell A2 contains > the name (Sheet) of the worksheet in Book containing the desi...

vb.net classmanager
I am asking for help on compiling a vb.net 2008 application since I have not been able to obtain a successful build with no errors yet. This application that we need to support has no documentation and the programmer(s) who wrote the application are not with the company any longer. This vb.net 2008 solution has lots of project files in it. You can compile this application in the following modes: a.debug, b. debug-test, c.debug-development, d. debug-production, e. release, and there is a class manager configuration file. I am getting errors like: 1. Error 33 The type or na...

Pivot Table Totals When Using Pages
Dear fellow Excel 2003 users, I have a pivot table that lists hours of several employees. A manager asked if there was a way to view just the non-billable hours. No sweat, I added a page field and selected non-billable and the sum of hours and the grand total showed just the non-billable hours. However, he was hoping to see the data section of the pivot table show just the non-billable hours with a column next to it showing the percentage of non-billable compared to the grand total of billable and non-billable. Problem: after scouring Google and the Help file, I cannot find a way to kee...

Most recent net worth figure on the "net worth over time" chart
It sometimes differs from the "total account balance" shown on the "account list", but most of the time remains the same. Shouldn't they be the same all the time? Right now, sometime it is much much bigger than the total account balance, giving me an illusion that I could retire now... Am I missing something? ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this lin...

Create a Custom POS Button for Frequently Used Items
Hello to all here is a link how to create custom pos buttons I have try to use it but I get an error " BridgeReceptor::OnFireEvent unknown even fired: Thank you http://www.microsoft.com/BusinessSolutions/Community/rms_create_custom_button.aspx It sounds like you may have mistyped the command. It could also be an incorrect parameter, but probably something mistyped - make sure you get the right spaces and commas in the command... -- Glenn Adams Tiber Creek Consulting http://www.tibercreek.com glenn@tibercreek.com ---------------------------------------------- Please DO NOT respond ...

automatic investment results in negative cash transaction
Hi, I'm using MS Money 07 Deluxe. I have automatic investments set up for some of my Mutual Funds. This money is drawn directly out of my checking account. I also have MS Money automatically updating the prices and account balance of these investments, so when I log on, I have transactions to read. When these automatic investments trigger, my account balance for these Mutual Funds is always short the amount I invest. For instance, I invest $100 per month in one mutual fund, and when Money updates this investment, the account balance is $100 short of what it should be. This $10...

How to detect binary file?
Our web app lets users upload tab-delimited files to the site, where the content is parsed & loaded to a database. Aside from looking for tab characters, control/linefeed characters, what would be a good way to detect if the user uploaded a binary file? Marty McDonald wrote: > Our web app lets users upload tab-delimited files to the site, where > the content is parsed & loaded to a database. Aside from looking for > tab characters, control/linefeed characters, what would be a good way > to detect if the user uploaded a binary file? You can't do so reliably. ...

How do I keep from printing extra lines on a file in Excel
I am trying to print a file with out printing the extra lines that appear at the end. One of my files prints without the extra lines; the other one prints extra lines. I can't figure out the difference in the 2 files Have yo set the print range? "Verle" <Verle@discussions.microsoft.com> wrote in message news:DF7FF1C8-7D63-4159-9968-582817313295@microsoft.com... > I am trying to print a file with out printing the extra lines that appear at > the end. One of my files prints without the extra lines; the other one > prints extra lines. I can't figure out the...

Backup file in Excel
I feel as though I remember that, in previous versions of Excel, you had the option on the File Properties screen to elect to create a backup file which was always the most recent version of that file prior to the current modifications. I cannot located the method for asking Excel to maintain these historical files in the XP version. Any ideas maniac File>Save As>Tools>General Options> "always create backup". Gord Dibben Excel MVP On Wed, 21 Jan 2004 09:11:07 -0800, maniac <anonymous@discussions.microsoft.com> wrote: >I feel as though I remember that, in p...