v-bind error:v-bind' is an undeclared prefix
Maybe it's too late, but for those who searching, I found good solution from here:
Well-formed XML cannot use the
:
and@
shortcuts forv-bind:
andv-on:
. And in XML these attributes are interpreted as namespace names.To use the
v-bind:
andv-on:
syntax in XML (e.g. XSLT files), addthese as dummy namespaces in the XML, e.g.<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:v-bind="https://vuejs.org/v2/api/#v-bind" xmlns:v-on="https://vuejs.org/v2/api/#v-on">
Then also add the dummy
xmlns:v-bind
to the<html>
element of theoutput – otherwise the definitions will be repeated everywhere.
It's not a problem about vuejs as this fiddle shows. The Razor Template engine does not know the namespace v-bind:
and only :
is invalid xml.You need to tell the template engine about the namespaces of vuejs. Here is another stack overflow article about adding custom namespaces to Razor template engine.