Advertisement

04.15.2008 at 07:36AM PDT, ID: 23323859 | Points: 500
[x]
Attachment Details

Preventing empty values in an XML node via XSD Restrictions

Asked by Wylkell in Extensible Markup Language (XML), XML Schemas for .Net

Tags: XML

I'm fairly new to XML and completely new to XSD but i've been setting up an XML Schema recently and hit a snag.  I've got some XML nodes/elements in an XML file (that references the XSD file) that can contain text but i want to require them to have actual valid text if they exist.  Originally i set up a restriction to require a minLength of 1, but this still allows <element>    </element> with nothing actually in the text (other then spaces) and i wanted to try and instead require real text to be inside of those tags.  Is there an option for this or should i be falling back on a pattern expression or something like that? (those make no sense to me by the way).  Any ideas?Start Free Trial
[+][-]04.16.2008 at 11:50AM PDT, ID: 21370808

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.06.2008 at 03:15PM PDT, ID: 21511508

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628