Frage

Possible Duplicate:
XSLT attribute node (id) cannot be created after the children of the containing element

Typically i am doing an XSLT process over a Weblogic12 server. I kept running into this issue

An attribute node (id) cannot be created after the children of the containing element

Before the migration, our team had no problems at all...

Any idea why? i recently upgraded from BEA Weblogic3 to Oracle Enterprise Weblogic 12. Or am i missing a library?

This is plaguing our entire team! Thanks!

War es hilfreich?

Lösung

If you want us to find where your code is wrong, you will need to show us your code.

The error message (I think) comes from Saxon, and it's possible that as a result of your configuration change, you are picking up Saxon as your XSLT processor where previously you were picking up Xalan. In XSLT 1.0 this was a recoverable error, and processors were allowed to ignore it (by simply not outputting the offending attribute). I think it's always a good idea to include

<xsl:comment><xsl:value-of select="system-property('xsl:vendor')"/></xsl:comment>

in production code so that you can see what XSLT processor you were using.

The error arises when you do something like this:

<a>
   <b/>
   <xsl:attribute name="x">3</xsl:attribute>

which you can't do because there isn't an open start tag to receive the attribute. Usually of course the circumstances are a bit more complex than this, for example the element might have been written as a result of an xsl:call-template instruction.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top