Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: Question Marks (???) in out put HTMl [Thread Next] Re: Question Marks (???) in out put HTMlTo: NULL Date: 3/8/2009 6:28:00 PM Zest4Quest wrote: > Thanks once again Martin.That Worked well.Only thing i had to do was continue > to use the following stmt. > buffer.Replace(@"xmlns=""http://schemas.datacontract.org/2004/07/EDIM.DataContracts""", ""); > > since without that, for some reason gave me a blank html output. Well that "hack" is certainly not necessary if you learn to write XSLT 1.0 stylesheet dealing with default namespace declarations. So instead of removing the xmlns declaration with string processing you would need to fix your XSLT stylesheet to bind a prefix to that namespace and use that prefix in XPath expressions and in XSLT match patterns to qualify element names e.g. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:dc="http://schemas.datacontract.org/2004/07/EDIM.DataContracts" exclude-result-prefixes="dc"> <!-- now use prefix 'dc' in expressions and patterns --> <xsl:template match="dc:foo"> <xsl:apply-templates select="dc:bar/"> <xsl:template> <xsl:template match="dc:bar"> <xsl:value-of select="dc:baz"/> </xsl:template> </xsl:template> So basically, in your stylesheet you need to replace all unqualified element names 'foo' by 'dc:foo'. That way your stylesheet would work without any need to preprocess the XML input with string replacement. If you don't understand what I am suggesting above then post your XML input and your stylesheet, then we can show you how to fix that. -- Martin Honnen --- MVP XML http://JavaScript.FAQTs.com/ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
