Representing HTML within an XML Schema
May 11, 2011 8:39 AM Subscribe
How do I indicate the potential presence of HTML within an XML element in that xml document's Schema?
posted by garius to computers & internet (5 answers total) 1 user marked this as a favorite
Putting together a schema for some XML files I produce, I've realised that I don't know how to represent the potential presence of html within an element.
So, for example if the xml is (square brackets obviously in there for tags):
[name]I am a story[/name]
[text]TEXT OF STORY WITH ASSORTED PARAGRAPH TAGS, STRONG TAGS ETC.[/text]
Then how do represent that in the schema? I had originally assumed it would be something like:
[xs:element name="name" type="xs:string"/]
[xs:element name="text" type="xs:string"/]
But this doesn't appear to be the case...