Workday errors in plain English.

Submit an Error

XSLT xsl:element With a Computed Name Fails Without a Namespace Resolver

✓ Verified Workday Studio 4 lookups
The error com.capeclear.mediation.MediationException: application=- Xslt step id=BeforeMerge failed to apply stylesheet BeforeMerge.xsl, reason: Internal error evaluating template rule at line 12 in module file:/var/opt/e2-runtime/deploy///WSAR-INF//BeforeMerge.xsl Root Cause: java.lang.UnsupportedOperationException: Cannot validate a QName without a namespace resolver

What does "com.capeclear.mediation.MediationException: Xslt step" mean in Workday Studio?

An xsl:element instruction is taking its element name from a variable at run time, and that value carries a namespace prefix. The processor has no way to turn the prefix into a namespace at that point, so it refuses to build the element. Desktop XML editors resolve names differently, which is why the same stylesheet can pass locally.

Quick fix

Add a namespace attribute to the xsl:element instruction giving the target namespace URI directly, or strip the prefix off the computed name with substring-after so an unprefixed name is produced.

Permanent fix

Never let a computed element name carry a bare prefix. Work out the local name and the namespace URI as two separate values and pass both to xsl:element. Validate stylesheets against the Studio runtime rather than only in a desktop editor, because the two differ in how they resolve names.

Troubleshooting

  1. Find the xsl:element whose name attribute is an expression rather than a literal. Only a computed name can produce this failure, so a stylesheet with no computed names is not the cause.
  2. Print the computed value immediately before the element is created. If it contains a colon it is a prefixed QName and needs a namespace in scope.
  3. Check whether that prefix is declared on an ancestor element inside the stylesheet itself. A prefix declared only in the source document or in a config file is not in scope for the stylesheet.
  4. Decide whether the output element genuinely needs a namespace at all. Mappings often copy a prefix across by accident when the target format wants a plain unprefixed name.
  5. If the namespace really is required, supply it explicitly on the instruction instead of relying on prefix resolution.
Was this helpful?

Related errors