xml - "This element is not expected" while using 'any' with xhtml namespace -


I have some problems with the XML schema, I need to put some HTML code into my XML file and I came to know that x : Anybody will help but xmllint return errors like this:

  example.xml: 4: element H1: schema validity error: element 'H1': this element is not expected expected ({Http://www.w3.org/1999/xhtml}*).   

XML:

  & lt ;? XML version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Foo & gt; & Lt; Bar & gt; & Lt; H1 & gt; Household Advertising & lt; / H1> & Lt; / Bars & gt; & Lt; / Foo & gt;   

Schema:

  & lt ;? XML version = "1.0"? & Gt; & Lt; Xs: schema xmlns: xs = "http://www.w3.org/2001/XMLSchema" & gt; & Lt; Xs: element name = "foo" & gt; & Lt; XS: complexType & gt; & Lt; XS: Sequence & gt; & Lt; Xs: element name = "bar" minOccurs = "1" maxOccurs = "unbounded" & gt; & Lt; XS: complexType & gt; & Lt; XS: Sequence & gt; & Lt; X: a name space = "http://www.w3.org/1999/xhtml" /> & Lt; / XS: sequence & gt; & Lt; / XS: complexType & gt; & Lt; / XS: element & gt; & Lt; / XS: sequence & gt; & Lt; / XS: complexType & gt; & Lt; / XS: element & gt; & Lt; / XS: Schema & gt;   

What do I do?

Schema states that every bar element can have an element that can be http://www.w3.org/1999/xhtml is in the namespace, but in the example documentation you used an element named h1 that is not in the name space, you should either put xmlns = "http://www.w3.org/1999/xhtml" on the h1 or the paper To put a prefix manifesto above (e.g. ) and then the XHTML Elements (use that prefix at & lt; h: H1> ).

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -