cancel
Showing results for 
Search instead for 
Did you mean: 

XSL Transfromation

Former Member
0 Kudos

Hi Guys,

Stuck up with XSL Transformation.

requirement Input XML --> <row>12 , wee , 67 ,6u,hh</row> multiple rows to a target XML.

I have created a XSL transformation using stylus studio worked fine and also used the same Input XML / XSL in XML query works perfect.

But when i use the same in --> XSL Transformation it is not working

Transform URL :: http://129.292.888/test.xsl

Input : Given Doc Output

Now when i execute it says always below

[ERROR]: XSLTransform error: The markup in the document following the root element must be well-formed.
[ERROR]: ACTION FAILED: End Action XSL_Transformation_0 : ( )

i checked many times Format is correct and same XSL works perfect in XML Query converting to desired output.

I have one more doubt in XSL Transaction : InputXSL ?? for what this used.

If any one used this action Block XSL Transformation give idea.

Adding to it i am using XMII 12 ,, any inputs ?

Rgds

Interface

Edited by: InterfaceSavy on Sep 8, 2009 12:58 PM

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

Long time ago, i suffered somewhat similar problem.

I got to resolve the issue by changing the way xsl / xml is defined is stylesheet in MII.

See example below :

SAP XMII could understand

<?xml version="1.0"?>

but not the one below.

<?xml version="1.0" encoding="UTF-8"?>

So if you are using encoding="UTF-8" anywhere, i would recommend you remove it and try.

All the best.

Thanks,

Vijay

jcgood25
Active Contributor
0 Kudos

InputXSL is for linking in the source of an xsl transform into the action (not necessary if you've used the configure dialog to load one from a URL).

Try your xsl URL in an XML loader and use a tracer action to see if the file is actually loading.

Former Member
0 Kudos

Hi

Many Thanks

Yes i tried the same seeing some sdn post , try to load in xml loader , below error it says

Error in loading XML : The markup in the document following the root element must be well-formed.

I even checked the format of the XSL loads fine in Explorer and works gud with XML Query.

Any idea ??

below 4r ref

<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output encoding="UTF-8" method="xml" media-type="text/xml"/>
	<xsl:template match="/">
		<Rowsets>
			<Rowset>
				<Columns>
					<Column Description=" " MaxRange="0" MinRange="1" Name="CoreID" SQLDataType="1" SourceColumn="CoreID"/>
					<Column Description=" " MaxRange="0" MinRange="1" Name="CoreDesc" SQLDataType="1" SourceColumn="CoreDesc"/>
				</Columns>
				<xsl:for-each select="Rowsets/Rowset/Row">
					<Row>
						<CoreID>
							<xsl:value-of select="substring(Row1,3,5)"/>
						</CoreID>
						<CoreDes>
							<xsl:value-of select="substring(Row1,6,8)"/>
						</CoreDes>
					</Row>
				</xsl:for-each>
			</Rowset>
		</Rowsets>
	</xsl:template>
</xsl:stylesheet>

rgds

Savy

Former Member
0 Kudos

What version are you on?

For 12+ try formating your URL something like this:

web://PROJECT/PATH/TO/XSL/IN/WEB/CONTAINER/stylesheets/transform.xsl

This way you avoid the security of the web containter which kicks in when using http...

Former Member
0 Kudos

Hi

Thanks

Am using 12 , WEB it wonot accept as you said i guess.

same error presists , any workaround needed ??

[ERROR]: XSLTransform error: The markup in the document following the root element must be well-formed.

Strange part same XSL file workd with XML Query giving desired output.

Any inputs ??

Rgds

Savy

Former Member
0 Kudos

Is your xsl in the web container?

Former Member
0 Kudos

Hi

Pasted you XSL for reference

<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output encoding="UTF-8" method="xml" media-type="text/xml"/>
	<xsl:template match="/">
		<Rowsets>
			<Rowset>
				<Columns>
					<Column Description=" " MaxRange="0" MinRange="1" Name="CoreID" SQLDataType="1" SourceColumn="CoreID"/>
					<Column Description=" " MaxRange="0" MinRange="1" Name="CoreDesc" SQLDataType="1" SourceColumn="CoreDesc"/>
				</Columns>
				<xsl:for-each select="Rowsets/Rowset/Row">
					<Row>
						<CoreID>
							<xsl:value-of select="substring(Row1,3,5)"/>
						</CoreID>
						<CoreDes>
							<xsl:value-of select="substring(Row1,6,8)"/>
						</CoreDes>
					</Row>
				</xsl:for-each>
			</Rowset>
		</Rowsets>
	</xsl:template>
</xsl:stylesheet>

rgds

Savy

Former Member
0 Kudos

Hi

Any body some views to proceed further

rgds

Savy