Namespace Not Being Inherited

A

Al Hatch

An element node is supposed to inherit the namespace of its parent. But one
of mine is not inheriting.

If I declare

<xsl:stylesheet
xmlns:cm="urn:schemas-Professional-Plug-in:p2:ClipMetadata:v3.0">

then I should be able to prefix any node reference with "cm:" For example,

<xsl:value-of select="cm:p2Main/cm:ClipName" />

And, indeed, that does work in every parser I've tested, except... the Xalan
parser used by FileMaker is complaining

"XML parsing error: Attribute Œxmlns:cm¹ is not declared for element
ŒFMPXMLRESULT².

But it is declared--in the very first line of the XSLT document!

The complaining element lives in this template

<xsl:template match="/cm:p2Main/cm:ClipContent">
<FMPXMLRESULT xmlns="http://www.filemaker.com/fmpxmlresult">
<ERRORCODE>0</ERRORCODE>
<PRODUCT BUILD="07/1/2006" NAME="FileMaker Pro" VERSION="8.0v1" />

<RESULTSET>
<xsl:attribute name="FOUND">
<xsl:value-of select="14" />
</xsl:attribute>
<xsl:call-template name="records" />
</RESULTSET>

</FMPXMLRESULT>

I have tried to insert that xmlns:cm declaration everywhere in the document,
but FileMaker still keeps complaining that it is an undeclared attribute.

Any ideas?
 
A

Al Hatch

I just had to add an "exclude-result-prefixes='cm'" to my declaration. It
wasn't the parser that was complaining, it was FileMaker.

Fenton Jones solved this one for me.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top