Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


MSXML4(SP2) StyleSheet load problem

From: mark.tootell@------.---
To: 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> &#xD; </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



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