aspose file tools
The moose likes XML and Related Technologies and the fly likes XSLT:  Locating bug????? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XSLT:  Locating bug?????" Watch "XSLT:  Locating bug?????" New topic

XSLT: Locating bug?????

Russ Ray
Ranch Hand

Joined: Feb 11, 2003
Posts: 52
I am new to XSLT and I am trying to work through a simple transformation process (XML to XML). I am trying to locate a bug in my XSLT code. The error I am getting is:
javax.xml.transform.TransformerException: java.lang.RuntimeException:
Programmer's assertion in getNextStepPos; unknown stepType:-1 (Location of error unknown.)
I don't find to much documentation on this type of error other than ensuring I don't use a "==" in any evaluation.
What I have done in an effort to locate this bug is to comment (<!-- and --> out all but two templates in the source file. The "Main" and "tech_order_object". However, I am still getting the error.

Here is the XSLT (mimus the commented out portions):
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl=""
<xsl utput method="xml"

<xsl:template name="Main" match="/">
<operation action="{TC_MODEL/@event}">
<xsl:call-template name="tech_order_object">
<xsl:with-param name="techOrder" select="//Object[@class='TechOrder']"/>
<xsl:template name="tech_order_object">
<xsl aram name="techOrder"/>
<objID><xsl:value-of select="$techOrder/@OBID="/></objID>
<number><xsl:value-of select="$techOrder/Attribute[@name='Number']"/></number>
<type><xsl:value-of select="$techOrder/Attribute[@name='Type']"/></type>
<title><xsl:value-of select="$techOrder/Attribute[@name='Title']"/></title>
<classification><xsl:value-of select="$techOrder/Attribute[@name='Classification']"/></classification>
<revision><xsl:value-of select="$techOrder/Attribute[@name='RevisionNumber']"/></revision>
<updated><xsl:value-of select="$techOrder/Attribute[@name='Updated']"/></updated>
This is the data:
<?xml version="1.0" encoding="UTF-8"?>
<Object class="TechOrder" creationDate="2003/09/26-13:11:52:476" OBID="njAnk2isite-etestdb-ettable-objid"><!--TO Number-->
<Attribute name="Number" type="String" length="30">
<Attribute name="Type" type="String" length="30">
</Attribute><!--TO Title-->
<Attribute name="Title" type="String" length="30">
<String>The Fine Art Of Zen</String>
<Attribute name="Classification" type="String" length="30">
</Attribute><!--TO Classification-->
<Attribute name="RevisionNumber" type="String" length="30">
</Attribute><!--Last updated-->
<Attribute name="Updated" type="TimeStamp">
</Attribute><!--Date TO Created-->
<Attribute name="CreationDate" type="TimeStamp">
</Attribute><!--Office of Primary Responsibility(Ownership)-->
<Attribute name="Creator" type="String" length="30">
</Attribute><!--Collection of Object References for Tech Order Content-->
<Attribute name="TechOrder_Content_Refs" type="NVSet">
</Attribute><!--Collection of Object References for Subscription-->
<Attribute name="TechOrder_Subscribe_ObjRefs" type="NVSet">
Could someone point me in the right direction?
Thanks for taking the time to read this!
Russ Ray
Ranch Hand

Joined: Feb 11, 2003
Posts: 52
Administrator: You can close this. I found me error.
For the Good of the group it was this statment:

<objID><xsl:value-of select="$techOrder/@OBID="/></objID>
It's a no-no to put the equal sign in when asking for the value of the attribute.
I agree. Here's the link:
subject: XSLT: Locating bug?????
It's not a secret anymore!