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

Similar Articles

[PageSpeed] 53

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:

Publisher can't open files...
Conditions for the PC mentioned below: O/S: Wxp Pro - total updated. Office: Of2k - total updated. ****** Situation: I have received e-mails with publisher-files attached. When I try to open the files, my Publisher comes up with the error-message (translated from danish to english): "Publisher can't open files, which are created in another version of Publisher." When I look in the properties of the files, I can see the author's name, but not the version of the publisher, with which the files are created, or the Publisher-format of the files. (It should have been a goo...

PDF File conversion problems w/ transparency filled boxes in Publi
Periodically, I like to use text boxes positioned over a photo in which I insert photo caption information. I would like to make the fill in the text box TRANSPARENT rather than solid. When I do this, it looks just fine in the Publisher file, but when I convert it to a PDF file (with Adobe Acrobat), I lose the transparency--it comes out as a box with grid/plaid-like shading in it. The same thing happens with the shading that is inherent in Word Art--when converted to PDF, the shading is comprised of GRID lines rather than an even transparent shadow. Is there a problem between coding in...

CSV file problem
Hi, Using Excel 2000 and I need to edit a CSV file. My problem is that the original file has quotes around each element but when I save the csv file from Excel it strips them off. I need the quotes left in. Any suggestion how to get Excel to leave the quotes in? Thanks in advance, Linn See http://www.mcgimpsey.com/excel/textfiles.html#csvwithquotes In article <eU8yb0X4EHA.664@TK2MSFTNGP10.phx.gbl>, "Linn Kubler" <lkubler@charter2.net> wrote: > Hi, > > Using Excel 2000 and I need to edit a CSV file. My problem is that the > original file has ...

BD en Access ---> SQL + WinForm en -Net Is it posible??
Hi, i have a DB in Access and i want to know if is possible convert it to SQL and WinForm in .Net. Thanks cientocienreg@gmail.com wrote: > Hi, i have a DB in Access and i want to know if is possible convert it > to SQL and WinForm in .Net. > > Thanks Sure. You acquire the tools for developing those and you re-write everything : ) Seriously, there are tools for upsizing your tables to SQL Server, but as with all "wizard-type" tools they make assumptions that in some cases are incorrect or at least undesirable. I prefer to use the SQL Server tools to build everyt...

MailItem object has no property for when a reply was sent
After replying to a message, new text appears at the top of the original message: "You replied on 12/8/2009 9:02 PM." In VBA, how do I detect if a mail item has been replied to? I've looked at the properties for the MailItem object. One of the MailItem properties is ItemProperties. I iterated through it. I can't find any property with this info. My goal is to automate finding duplicate mail items. Many items got duplicated by accident. I thought I'd just look for items with the same subject, received time & a couple other attributes. Then delete a...

remove excess (unwanted) rows from the bottom of a speadsheet
I have some spreadsheets submitted to me that are upto 65000 rows, with only the first 4000 rows used. How can I remove these unwanted rows. Deleting only replaces teh rows with new blank rows. At the moment I am cutting / pasting in to a new worksheet and then re-establishing all the links. THere must be an easier way. You can't remove them, as the sheet is a fixed size. However, you can hide them. Select the rows below the data then click on Format | Rows | Hide then click OK. Hope this helps. Pete On Nov 26, 10:01=A0am, alun.re...@bamnuttall.co.uk <alun.re...@b...

Using Doxygen's \callergraph command ???
So far I can only get Doxygen to generate callergraphs for ALL functions or for NO functions, Doxygen seems to be ignoring the \callergraph command. Does anyone know how to limit Doxygen to producing complete callergraphs (the entire function call sequence that ends up at a specific function) for a limited number of functions? PeteOlcott wrote: > So far I can only get Doxygen to generate callergraphs for ALL > functions or for NO functions, Doxygen seems to be ignoring the > \callergraph command. Does anyone know how to limit Doxygen to > producing complete callergraphs (the entir...

share pst file without Exchange?
I have a home network - an old laptop in the kitchen and a new desktop in the office. I want the Outlook files to reside on the desktop since it's backed up and more reliable but would like to use the laptop for sending/receiving email. I'd like to be able to see the same info (sent mail, inbox, calendar) on both computers. Is it possible without using Exchange? I've succesfully connected the laptop to a mailbox.pst file on the desktop but since the inbox is empty I can only assume this isn't where the email is stored. Well, I have been trying to figure this out my...

Help with query using multiple variables
Current query fields: Account, SumPrincPmts, Transactions, PostDate I am needing to run a query from a form (form name: frmbuyout) that places the results in a report (Test). I need this query to Filter my results by date and where the Principal pmts (are listed in table as a LTD Sum) are less than the Total Transactions by account(currently in the table the transactions are listed individually and not a sum of). With the code below I can filter the information by date but I am having trouble finding a way to also filter by pmts value being less than the sum of the total transactions (this wi...

Data file not closed properly
Everytime our users have Outlook open then close it (properly), but need to get back into it immediately, they receive this message. "The date file 'personal folder' was not closed properly." "This file is being checked for problems" This message started appearing about a week ago. I can't find any information about it or what's the real cause. Is it because of SP3 for Office? Does anyone have a clue?? Please help... ...

Populate a form based on a query using parameters
I have created a form that is populated from a query. I have a text box set up as an input box and click a button (Search) to execute the search. This appears to be working fine as the query opens and runs. However, it displays in the query in data format instead of in the Form I created. How do I get this information to populate the form, not the actual query. The Search button is set to RunQuery. On Apr 19, 7:07=A0pm, Mommybear <Mommyb...@discussions.microsoft.com> wrote: > I have created a form that is populated from a query. =A0I have a text bo= x set > up ...

XmlDocument Performace & XmlWriter namespace oddity
Hi, 2 questions.... 1. I'm parsing an XHTML document that contains both the default namespace (xmlns="http://www.w3.org/1999/xhtml") and a custom one (xmlns:r="...") - both of these being attributes of <html>. When I then insert new XmlNodes into the DOM the HTML tags all end up getting an unnecesarry 'xmlns' attribute added, elements with the 'r' prefix don't, which is correct. Is there any way to stop the XmlNode/XmlWriter from inserting the unneeded attributes to the html tags? 2. My program is reading in an XHTML file, adding/removi...

Master File Setup blunder
We accidently setup a Location Code and named it '69Mack'. It should have been named '66Mack'. Besides the Site, we are using the BSSI Multi-Facility product and have the Facilities called '69Mack'. Is there a way to query the GP Database and find all the instances of '69Mack'? I am trying to determine if it would be better to start from scratch or just write an update statement changing th 69 to 66? Thanks -- Craig I agree someone was listening to something. We do own the PSTL software and now that you mention it I recall seeing the Site Modifie...

Importing a text file w/ more than 65,536 rows
I'm trying to download a text file which exceeds the number of rows on an Excel worksheet. The help menus for Excel 5.0, 7.0, and '97 specify a way to use the Text Import Wizard to import the file to multiple worksheets. However, I have Excel 2000, and cannot locate any instructions about how to download to multiple worksheets. Anyone have any suggestions? I'd use my favorite text editor and split the text file into smaller pieces. Then import them separately. Or you could use a macro that imports each line: http://support.microsoft.com/default.aspx?scid=kb;EN-US;q120596 ...

I forgot the password I used for a Word Document.
Is there a way to retrieve a password used in a MS Word document? Kathy wrote: > Is there a way to retrieve a password used in a MS Word document? If you mean a password needed to open or edit the document, the answer is "probably not". If it's a password for forms protection, that can be removed easily. See http://www.gmayor.com/Remove_Password.htm. -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. ...

file management
I have an excel spreadsheet to track my quotes., I create my quotes in word for e-mailing and faxing. Can I connect the two programs together. My goal is to be able to search by quote # that I have created in an excel column and retreive the quote from word. -- DJ Treat the XL spreadsheet as the data source. Then, in Word, create a Mail Merge document (template) that uses the XL data as its data source. -- Regards, Tushar Mehta www.tushar-mehta.com Excel, PowerPoint, and VBA add-ins, tutorials Custom MS Office productivity solutions In article <7103AE63-5A18-49E5-BDF3-A565ED97C00D...

How to pass xml inside xml to an xslt
Hi I have an xslt. The input to the xslt is a dataset. In that dataset, in one of the datatables' column I am stroring xml data using XmlDocument. Now, when I transform this xslt in c# I get the following error: "Unexpected XML declaration. The XML declaration must be the first node in the document, and no white space characters are allowed to appear before it." Is there a workaround to this problem? Thanks, Anshul Bansal Anshul Bansal wrote: > I have an xslt. The input to the xslt is a dataset. In that dataset, in one > of the datatables' column I am stroring x...

publisher file conversion message
I have publisher 2003. When I get an email with a jpg attachment. When I select open, Publisher gives me a file conversion message. This is a new message. Why can't I open these attachments? flowjam64 wrote: > I have publisher 2003. When I get an email with a jpg attachment. > When I select open, Publisher gives me a file conversion message. > This is a new message. Why can't I open these attachments? ============================ There's no reason to have Publisher associated with .jpg files. Have a look at the following info: (307859) HOW TO: Change File Associa...

Excel 2002 program opens but not the excel file being opened
( using Win XP Pro and Excel 2002 ) -a user double clicks on the excel file in Windows explorer and excel program opens up but not the file -if you click in Excel on Window, New window, the file appears in Window 2 and if you go back to Window 1 the file now appears -any help to fix this? thx Steve Try Tools / Options / General / Uncheck 'Ignore Other Applications' -- Regards Ken....................... Microsoft MVP - Excel Sys Spec - Win XP Pro / XL 00/02/03 ---------------------------------------------------------------------------- It'...

How do I record a macro which should work on multiple files ?
Hi, I'am interested in creating Macros for some job tasks of mine. I went through the Excel course of "Working with Loops" in Macros and have attained some basic information on VBA. But since I'am not an expert in it, I want to create Excel macros, using the Option " RECORD MACRO" in excel. My problem is that, I want the MACRO to (a) Copy data from 2 files into a new file. (b) Analyze this data with calculations (c) Build a graph.......basically the summary sheet and graph in a new sheet of the new file. I want to know, whether, can we do such a macro using &...

Can't use ITune songs in Powerpoint presentation
ITunes Store downloads songs as MPEG 4 which Powerpoint 2007 doesn't recognize on my PC with Windows Vista. When converted to .mp3 and inserted, there is no sound in Powerpoint. I've used dBpoweramp to convert to WAV, but still no sound on Powerpoint. All versions play on the computer with ITunes or Windows Media player. Any suggestions how to get these songs into Powerpoint? Thanks. Hi I'm afraid the file may have DRM protection, in which case it won't work in PowerPoint. Lucy -- Lucy Thomson PowerPoint MVP MOS Master Instructor www.aneasiertomorrow...

moving outlook express to xp, 2003 outlook files
were trying to move outlook express address to a new 2003 outlook on an xp system. The old is a windows 98 system, on a network. And so far have no been able to import the setting or address. Greg you need to set OE up on the new machine then import it - or import it to OL on the old machine - in either case, you need oe and ol configured on the machine. See tomsterdam.com if you need instructions on reconnecting oe files when you move them. -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Coauthor, OneNote 2003 for Windows (Visual QuickStart Guide)...

OLE object defaults
I have some records that I need to add a Visio drawing to. The drawings are stored within an OLE object. It works fine. However I need to be able to set some defaults for the OLE object so that when a new record is added the user doens't have to goto the insert menu, pick active x control and select Microsoft Visio Drawing each time. I need to set the OLE object to be an activex control with type Microsoft Visio Drawing for each new record. Anyone got any ideas for the code to do this? ...

Restoring .edb files : How can I find e-mail addresses? (5.5)
My Exchange Server 5.5's services Internet Mail Service and its' dependent service Message Transfer Service could not start. I read the event logs and found Event ID: 7001. Then I found the solution from Knowledge Base. According to this, I copied .edb files, reinstalled Exchange and service pack 4, restored .edb files as told in the document; but I saw that all e-mail addresses of the Active Directory users changed with the host computer's name SITE.SITE.COM. Where can I find the e-mail addresses? Site Addressing generates the SMTP addresses. You can change it there for ...

Isolating an image in a jpg file?
Using MS Publisher 2002 via XP Pro, I need to remove the white background in .jpg files by adding 'points' all round the image then dragging them as close as possible to the image itself. Thus isolating it from the excess 'white' - if you see whatI mean? Step by step if you'd be so kind? Thank you. John --------------------------------------------------- John wrote: > Using MS Publisher 2002 via XP Pro, I need to remove the > white background in .jpg files by adding 'points' all > round the image then dragging them as close as possible > to t...