Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Question Marks (???) in out put HTMl

From: Martin Honnen <mahotrash@-----.-->
To: 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/


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent