Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries [Thread Prev] >Thread Next - Re: MSXML4(SP2) StyleSheet load problem MSXML4(SP2) StyleSheet load problemTo: NULL Date: 7/4/2007 7:04:00 AM
I am currently attempting to sort out a problem with StyleSheet
loading in a previous colleagues application. Below is an extract of
the StyleSheet I am attempting to load:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:k="http://www.mywebsite.com/2003/XMLSchema"
xmlns:s="xsi"
xmlns:title="urn:something"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" encoding="UTF-8" indent="yes"/>
<xsl:variable name="Context">title:Context</xsl:variable>
<xsl:variable
name="ReportingDataAbsoluteTiming">title:ReportingDataAbsoluteTiming</
xsl:variable>
<xsl:variable name="PointID">10011</xsl:variable>
<xsl:template match="/">
<xsl:apply-templates select="*"/>
</xsl:template>
<xsl:template match="k:header/*">
</xsl:template>
<xsl:template match="k:body">
<xsl:text> 
 </xsl:text>
<TITLE xmlns="urn:something" xmlns:title="urn:something"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:something TITLESchema.xsd">
...
The code I am using to load the StyleSheet is as follows:
IXMLDOMDocument2Ptr pStylesheet;
try
{
pStylesheet.CreateInstance(__uuidof(DOMDocument40));
pStylesheet->async = VARIANT_FALSE;
pStylesheet->load(_variant_t(StyleSheetName));
if(pStylesheet->parseError->GeterrorCode() != 0)
{
MessageBox("Failed to load StyleSheet");
}
}
catch(...)
{
MessageBox("ERROR");
}
When the application attempts to load the StyleSheet it throws an
error, and through interrogation of parseError I have determined that
it is being caused by the lineL
<TITLE xmlns="urn:something" xmlns:title="urn:something"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:something TITLESchema.xsd">
within the StyleSheet and specifically the use of xmlns:xsi="http://
www.w3.org/2001/XMLSchema-instance". If I replace XMLSchema-instance
with XMLSchema the StyleSheet will load but this then causes me
problems later on as the file I subsequently create fails validation.
Does anyone have any ideas what the problem might be, and how I can
overcome it?
Thanks for your help
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
