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

Similar Articles

[PageSpeed] 17

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:

form objects
hello, i am using excel 2000. i have designed a form in a worksheet by placing objects (checkbox, radiobuttons, text boxes, labels) in excel. the problem: when i save and preview or print the document, the printout is same as the form designed, after printing/previewing the document, when i return to worksheet, all the objects are aligned towards left (into a single column)- overlappping each other. if i donot save this, close and reopen the workbook, the objects are back in ther place, as designed. can somebody help in resolving this alignment problem. Why don't you...

cfgmgr32.dll is using obsolete deprecated CM_Detect_Resource_Confl
Hi, In my application (VC++ 2008 SP1 & WDK 6001.18000) I am using "Get_Next_Res_Des" to get device information. But the UMDH (User-Mode heap dump) call stack shows: CFGMGR32!CM_Detect_Resource_Conflict+00000065 CFGMGR32!CM_Get_Next_Res_Des_Ex+00000278 CFGMGR32!CM_Get_Next_Res_Des+00000017 ................................. And MSDN says "CM_Detect_Resource_Conflict:This function is obsolete and no longer supported in Windows 2000 and later versions of Windows. Use CM_Query_Resource_Conflict_List instead." http://msdn.microsoft.com/en-us/library/ms...

Creating a Stationary Style in Outlook by Using Publisher
I have been trying to create a page using Publisher 2000 which I can use as my default personal e-mail page. However when I try to send it to another email address it is not received as the original web page I created in Publisher. The 1st time I sent the message said I sent the page as an attachment although I didn't sent it as an attachment. The second time I tried to save the Publisher created page as a web page format and received a bunch of numbers and letters when it was received on the other end. Finally, is it possible to create a stationary style in Outlook using a Pu...

How do you create an "html" file? #2
How do you create an "html" file? We need this file to display messages & promotions on the costumer display monitor ...

How do I use the timecard template if I am using a time clock and.
I need help using the time card template in Microsoft Excel We use a time clock and the employees punch the card when the come in and when they leave in the evening. I would like to set iup the template. HELP!!! Thanks , Gargi Hi Gargi what i've not sure about is how the information gets from the card to the excel spreadsheet - are you going to retype it? if so what assistance do you need in setting up the spreadsheet beyond ...............A.......................B.....................C........................D....................E 1.........Employee #............Date............S...

two problems using Outlook and Word
Does anyone know why it is that when I open an email in Outlook which comes in as an HTML doc, and try to respond to it, the format of the response converts it to plain text format in a hideous courier font? Which cannot be converted into HTML because the option is grayed out? Is this in some way related to the reason why I cannot now respond to emails without getting a warning that something is trying to access Microsoft Word and should I allow it and if so for how long? Whatever option I try, the result is the same, either Word opens as it should, as Word seems to open as this TXT version ...

Using CDialog as base class
Hi, Im kinda new to vc++ programming and i have a problem with CDialog, im making my own class to create skinnable dialogs with CDialog as base class, class CSkinDialog : public CDialog { public: CSkin(); virtual ~CSkin(); <i will add my skin functions here> }; In my dialog class i replaced "public CDialog" with "public CSkinDialog" but when i try to compile it i get this error: error C2614: 'CTestDlg' : illegal member initialization: 'CDialog' is not a base or member Any help is welcome :) Thanks in advance, Thomas "Thomas" <Da_Q...

Use first day of month formula in a drop down list
I'm using the formula =DATE(YEAR(B4),MONTH(B4),1) where cell B4 = Today() and this works to give me the 1st day of the current month. My question is: How do I use this in a drop down list on a separate worksheet in the same workbook? I have tried to name the cell containing the 'date' formula, but it looks like Excel does not allow naming a cell with a formula. Each time I name the cell (select the cell, click on the 'name box', type name, enter) when I re-select the cell it hasn't changed the cell name. It defaults back to the row/column name. Than...

Office '97
I downloaded the compatibility pack and it worked, BUT... Now when I try to open email Word attachments, the computer tries to save it, instead of opening it. HELP! Greg Should be working fine on your Windows 98 . Just a presumption since you did not post details of your OS or on anything else If you have XP,Vista,Win7 then you are out of luck since Office 97 is not supported on these or on any other OS -- Peter Please Reply to Newsgroup for the benefit of others Requests for assistance by email can not and will not be acknowledged. "Greg" <Greg@discus...

writing the text inside the Form object
Is there a form object (for a web flowchart) that would let you write inside the form object, instead of below it? The form object is the grey square object with text boxes in it. I wanted to put some text above the text boxes in the form - similar to the standard flowchart symbols. I think I have seen this in other diagrams, but don't know how to do it. Also, for the web page object the text doesn't wrap like the standard flowchart symbols do - is there a way to make it wrap? Thanks, Tom. ...

Hide results
I am putting together a summary spreadsheet of dates from seperate worksheets in an excel file. In the summary sheet I reference the 'end' date from the summary sheet. If there is no date in the original file, what formula can I use to leave that cell blank/hide on the summary sheet? The way I have it now the results show the default of 1/0/1900 Here is the formula used to reference the info from. =Summary!K5 =IF(Summary!K5="","",Summary!K5) -- David Biddulph "bigred72" <bigred72@discussions.microsoft.com> wrote in message ...

Office Object Library differs on NT
Hello, I have a database which I run as a front-end .mdb file with the User Interface and queries, and the back-end .mdb file which contains all tables with data. I am running Access 2000 on WinXP. I am constantly making changes to the front-end, and when necessary I instruct my clients to copy the latest version of the front_end to their local machines. One unfortunate PC is still living in the dark ages and is on Windows NT(although it does have Access 2000). And the problem is: When I copy a new version of the front-end .mdb file to the NT machine, I always have to go and change ...

I can't open Office Data File from CDs #2
Dear technical experts, I have been facing a security problem with Microsoft Outlook files. I exported Outlook items into Office outlook files (with the extension is .pst). The exported files were firstly saved on my computer (different path and location in comparison with default path of Office Outlook files in Documents and Settings). I can open my exported files easily. Because the size of outlook items is very large, I would like to save Office outlook files on another storage device in stead of using hard drives of my computer. I made copy these files to a flash drive (USB dri...

Can't share my medialibary to my Xbox 360, using the extender func
Hi, I'm running vista SP2, but this problem has been running for quite a while. 1 1/2 year past. my mediaplayer 11 suddenly started rejecting sharing my media to my xbox. When i go to libary and click sharning, it shows up an error message who says: Can't start media sharing because of a change in a windows setting- or component. Click for help on the web if you need further assistance. I have tried every advise on the site, starting processes again and so on, but so far nothing at all has helped. Can anyone help me please. I think this problem could be solved if I r...

Index
Hi, I created a primary key when I created my table. I now want to create an index on multiple fields. How do I do that and how do I use this new index in a quary Thank you. Avaya Assuming Access 2003 or earlier, to create a multi-field index, either click on the Index icon on the button bar (it's a bunch of horizontal lines with a lightening bolt to the right), or select Indexes from the View menu. Pick a name for the index (it doesn't matter what you call it) and put that in the first column of the first empty row. In the next column, put the name of the first field you...

using outlook for email
I have windows xp and also office 200 premium.however, when i try sending an email while using explorer, i receive a message that reads "either there is no default mail client or current client cannot fulfill messaging request.Please run outlook and set it as the default mail client. I use AOL and have no problem sending email when i use it, however, when i use explorer i can't. is there a way i can set it up to be able to send an email? do i always have to open aol to send one? also, i have no idea how to configure it.also, when i try to set outlokk up, it asks for a postof...

Writing Formula For conditional Formatting Using Excel 2000
Hi Everyone: Does anyone know how to write three seperate formulas for these questions in the conditional formatting box Using Excel 2000? 1?: Red. If the value that is calculated in cell B42 is = to or less then the value in Cell B43 turn Cell B42 Red. Actual value in cell B42 and B43 are whole numbers 2?: Light Green. If the value that is calculated in cell B42 is between 1% and 29.99% greater than the value in Cell B43 turn Cell B42 light green. 3?: Dark Green. If the value that is calculated in cell B42 is greater by 30% or more then the then the value in Cell B43 turn...

Converting mysql query result to xml
Hi all, I'm a newbie in .net xml programming, so please be patient. And sorry for my uncorrect english, too. I'm going to explain my problem: I've built a web service which responds to ferries timetable requests. It receives an xml document with this format: <TimeTableRequest> <Routes> <Route> <Company></Company> <DeparturePort>ptf</DeparturePort> <ArrivalPort>pio</ArrivalPort> <Date>2006-12-20T13:00:00</Date> </Route> <Route> <Company></Company> ...

Inserting PDFs into Publisher File
I can't insert PDF's into my publisher newsletter by trying the insert command. I have to copy it and then past and it loses some quality. Anyone know how to get around this insertion problem? Thanks Greg Save the .pdf as another format and then insert it. -- JoAnn Paules MVP Microsoft [Publisher] "gporell@southshoresenior.com" <anonymous@discussions.microsoft.com> wrote in message news:11af01c50a30$d6c8d0c0$a401280a@phx.gbl... >I can't insert PDF's into my publisher newsletter by > trying the insert command. I have to copy it and then > pas...

Publisher 2003- message
I have used Publisher for a 120+ page "news letter" for the past 5 years. Upgraded to 2003 early last year. Have had a problem with fonts changing indescriminately (no sollution as yet). Latest problem - having spent many hours on a new document which includes grafics and text - I received the message - Publisher cannot open the file. HELP PLEASE Surely after 5 years you have a backup or two. It is never a good idea to use the same document over and over without re-saving it with a new name. Maybe you have a copy in a temporary folder Type %temp% in the address bar of Wind...

Using REPLACE function in Excel
Is it possible to Replace multiple lines of text in an Excel Cell as a single action - including the line returns? Manually? And did you use alt-enter to force the new line within the cell? Edit|replace what: (yourstringhere) with: (yournewstringhere) replace all When you're typing in the strings, you can use ctrl-j to represent the newline in the cell. Don't look at the screen--'cause it may not look like you're typing anything after the ctrl-j, but you are. GarryG wrote: > > Is it possible to Replace multiple lines of text in an Excel Cell as a single > act...

save array to file, read it back in
Hi, I just have an RGB volume buffer allocated like: unsigned char pBuffer = new unsigned char[256 * 256 * 50 * 3]; and I'd like to dump it straight to a file so I can read it back in exactly as above. Can I do something like this: ofstream o("C:\\test.raw"); o << pBuffer; o.close(); // Later on read it back in... ifstream i("C:\\test.raw"); unsigned char *pLater = new unsigned char[256 * 256 * 50 * 3]; i.read(); i.close(); Thanks I would write it out in ASCI and then convert when reading back. Since you are using MFC...

NET 4.0 C# new argument feature.
Hello, I know that in NET 4 instead of using: public int method(string p1) {}; public int method(string p1, string p2) {}; I can use simply: public int method(string p1, string p2 = "") {}; But it seems I can't use the following: public int method(DateTime dt1, DayOfWeek eFirstDayOfWeek = DateTimeFormatInfo.CurrentInfo.FirstDayOfWeek) It seems the default values must be only "", int, etc. Maybe I am looking at this the wrong way but it does not make a lot of sense ... Does it? Thanks, Miguel Hi, The optional argument needs to be a constan...

Is there a VOIP Control that I can use in my form
Has anyone ever heard of a VOIP Control or even an application that I can interact with. I am happy to pay for it. ie let the user make calls but my software can record the number/time/user etc. -- Regards Tom There is a dialer for a computer modem that uses TAPI which would work for VoIP phones like Vonage. There's even a wizard, just turn on the toolbox wizards and add a command button. The navigate to Miscellaneous on the left listbox, and AutoDialer on the right listbox. -- Arvin Meyer, MCP, MVP http://www.datastrat.com http://www.mvps.org/access http://www.accessmvp.com &q...

Excel crashes with linked files
Hi All, I was recently issued a new laptop and now Excel crashes frequently, sometimes upon opening a file, sometimes upon closing a file, and most recently upon changing the font. The most obvious thing that all the files have in common is that they contain links to other worksheets. Does anyone have any idea what may be causing this and/or how to fix it? I'd appreciate any suggestions. Erin Erin, have you tried un-installing Excel/Office and re-installing? It sounds like something is wrong with Excel. Bob Flanagan Macro Systems http://www.add-ins.com Productivity add-ins an...