Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

AccessXLST Transform Error - Version Missing

Status
Not open for further replies.

gino5555

Technical User
Jun 16, 2005
7
US
Access 2003 Database

I have been assigned the task of outputting data in XML for an outside agency. I was given an XSD file that has the proper validation the outside agency is looking for.

Here is what I did:
*Created a query bringing together items to export
*Exported query to XLS and created an XSD
*Used Altova Mapforce to map the two XSD files and create an XSLT file

Files used:
SCCPrograms.xsd - file given from outside agency
SccTransmitQueryJPR.xsd - XSD created from query with same name
MappingMaptoSCCPrograms.xslt - file created by Mapforce (and they validated it)

When I try and export the query applying the XSLT file I receive the below error:

"Specified transform failed to successfully transform your data. Required attribute '{ version' is missing."

Top part of XSLT file code:

Code:
<?xml version="1.0" encoding="UTF-8"?>
	<xsl:output method="xml" encoding="UTF-8" indent="yes"/>
	<xsl:stylesheetversion="1.0"xmlns:xsl="[URL unfurl="true"]http://www.w3.org/1999/XSL/Transform"[/URL] xmlns:xs="[URL unfurl="true"]http://www.w3.org/2001/XMLSchema"[/URL] >
	<xsl:template match="/">
		<xsl:variable name="var1_instance_SCC_TransmitQueryJPR" select="."/>
		<SCC>
			<xsl:attribute name="xsi:noNamespaceSchemaLocation" namespace="[URL unfurl="true"]http://www.w3.org/2001/XMLSchema-instance">[/URL]
				<xsl:value-of select="'//Acer-desktop/my acer documents/SCOTTS~1/SCCPrograms.xsd'"/>
			</xsl:attribute>
 
[1] ><xsl:eek:utput method="xml" encoding="UTF-8" indent="yes"/>
xsl:eek:utput is child element of xsl:stylesheet, the root, not its sibling.

[2]
><xsl:stylesheetversion="1.0"xmlns:xsl="[ignore][/ignore]" xmlns:xs="[ignore][/ignore]" >
[tt]<xsl:stylesheet[highlight] [/highlight]version="1.0"[highlight] [/highlight]xmlns:xsl="[ignore][/ignore]"[highlight] [/highlight]xmlns:xs="[ignore][/ignore]">[/tt]

ps: Is that what they generated?!
 
Thanks, I will give that a try. Yes, this was entirely generated by Mapforce. I did notice the spacing earlier today and it did not help at all. I will see if your suggestion works.

Thanks!

Jaynelle
 
>I did notice the spacing earlier today and it did not help at all.
That is not the way to look at thing. If it is the way to do thing, it is the way. Without spacing? nothing would ever ever work.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top