W3C home > Mailing lists > Public > xmlschema-dev@w3.org > July 2004

Looking for advice on empty tag usage

From: Wilde Rebecca L SSgt HQ SSG/STS <Rebecca.Wilde@Gunter.AF.mil>
Date: Mon, 26 Jul 2004 11:06:07 -0500
Message-ID: <0E7391319A8BE84EB2DC1E283C6A381E075762D4@fsjubj12.exchange.gunter.af.mil>
To: <xmlschema-dev@w3.org>
Hello,

I'm working on creating an XML schema to be used with XSLT and Web
Services that interfaces with a legacy system.  On this legacy system
there are fields that accept values like "*" to signify that the user
wants to clear whatever was stored in that field before.   I would like
to create something more user friendly and intuitive (while still
allowing a user to send an asterisk to mean clear as well) and so some
ideas I have come up with are:

1) Use an empty tag such as <ClearNarrative/> and then putting a group
choice of <ClearNarrative/> and <Narrative/> within my sequenced type.

2) Use an attribute to signify that the field should be cleared on the
legacy system.  Only problem is I don't see a way to use the attribute
with just listing the attribute without a value (i.e. <Narrative clear>
instead of <Narrative clear="Y">.

I cannot just assume that if <Narrative/> is sent to my Web Service that
the user wants the field cleared as some programs that interface may
decide to send all tags whether information is being passed or not.

I was wondering if there might be a best practice around on how best to
solve my problem.  Or if anyone might have some wisdom to share on this
type of situation.

Thank you in advance,
Rebecca Wilde
Received on Monday, 26 July 2004 12:18:41 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 07:15:10 UTC