XmlException "Root element is missing" on XslCompiledTransform.Load method
- From: "Tomas" <tomas_sandkvist@xxxxxxxxx>
- Date: Mon, 20 Nov 2006 10:06:58 +0100
When I try to load my xslt i get an xml exception with the message "Root element is missing". The style*** works when I preview it in stylus studio, but apparently not in my application. Any ideas what may be wrong?
The style***:
<?xml version="1.0" encoding="utf-8"?>
<xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
<xsl:output indent="yes"/>
<xsl:template match="/">
<xsl:apply-templates select="PC"/>
</xsl:template>
<xsl:template match="PC">
<xsl:element name="pcf:PC" namespace="http://www.protang.se/ProFrame">
<xsl:attribute name="name">
<xsl:value-of select="@name"/>
</xsl:attribute>
<xsl:apply-templates select="type"/>
<xsl:apply-templates select="*/@name"/>
</xsl:element>
</xsl:template>
<xsl:template match="type">
<xsl:copy>
<xsl:copy-of select="node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="@name">
<xsl:element name="{.}">
<xsl:attribute name="name">
<xsl:value-of select="local-name(..)"/>
</xsl:attribute>
<xsl:if test="current()='option'">
<xsl:attribute name="present">
<xsl:value-of select="../@present"/>
</xsl:attribute>
</xsl:if>
<xsl:copy-of select="../node()"/>
</xsl:element>
</xsl:template>
</xsl:transform>
<!-- Stylus Studio meta-information - (c) 2004-2006. Progress Software Corporation. All rights reserved.
<metaInformation>
<scenarios ><scenario default="yes" name="Scenario1" userelativepaths="yes" externalpreview="no" url="file:///p:/Avdelningar/1107TC/ProFrame demo (TS)/demo form_data5.xml" htmlbaseurl="" outputurl="" processortype="internal" useresolver="yes" profilemode="0" profiledepth="" profilelength="" urlprofilexml="" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext="" validateoutput="no" validator="internal" customvalidator=""/></scenarios><MapperMetaTag><MapperInfo srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no" ><SourceSchema srcSchemaPath="file:///p:/Avdelningar/1107TC/ProFrame demo (TS)/demo form_data4.xml" srcSchemaRoot="PC" AssociatedInstance="" loaderFunction="document" loaderFunctionUsesURI="no"/></MapperInfo><MapperBlockPosition><template match="/"></template></MapperBlockPosition><TemplateContext></TemplateContext><MapperFilter side="source"></MapperFilter></MapperMetaTag>
</metaInformation>
-->
.
- Follow-Ups:
- Prev by Date: Re: how to deserialize variable element/node
- Next by Date: Re: XmlException "Root element is missing" on XslCompiledTransform.Load method
- Previous by thread: Re: what can i do if i want to include "<" or ">" in xml document.
- Next by thread: Re: XmlException "Root element is missing" on XslCompiledTransform.Load method
- Index(es):