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?
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):
[article]
[name]I am a story[/name]
[text]TEXT OF STORY WITH ASSORTED PARAGRAPH TAGS, STRONG TAGS ETC.[/text]
[/article]
Then how do represent that in the schema? I had originally assumed it would be something like:
[xs:complexType name="article"]
[xs:sequence]
[xs:element name="name" type="xs:string"/]
[xs:element name="text" type="xs:string"/]
[/xs:sequence]
[/xs:complexType]
But this doesn't appear to be the case...
posted by garius to computers & internet (5 answers total) 1 user marked this as a favorite
posted by Rhomboid at 9:00 AM on May 11, 2011