[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Empty Elements in .NET

Subject: RE: Empty Elements in .NET
From: Peter Flynn <pflynn@xxxxxx>
Date: Fri, 06 Feb 2004 13:56:51 +0000
elements of .net
On Thu, 2004-02-05 at 14:47, Andrew Welch wrote:
> > Regardless of the form of schema I use .NET creates
> > <ERROR a='data' ...></ERROR>
> > 
> > Rather than the expected form of
> > <ERROR a='data' .../>
> > 
> > The problem is compounded when <xsl:output indent='yes' /> is 
> > used.  In the first form the indentation whitespace makes the 
> > instance document invalid against either form of schema.  If 
> > the second form were generated the indentation would not be an issue.
> 
> 
> Really?  So a schema can tell the difference between 
> <node></node>
> and 
> <node/>
> 
> Is that really the case?

It ought to be, of course, but I don't think that's the 
point. The OP seems to be saying that the validator is 
objecting to the first form being indented, but not to 
the second form being indented. 

If that is so then I would guess the software is broken. 
Indentation can only affect the context of the content 
model of the *enclosing* element: once an element is
closed by its end-tag (NET or otherwise), basta, finito.

In any case, I don't see any indentation in the example
given. 

More likely is that the element is declared as EMPTY,
which ought to mean what it says: no chance *ever* of
any content, because the special form of the start-tag
precludes it. Unfortunately this simple message failed 
to go home, and <foo></foo> is taken to be the same as
<foo/>.

Those who remember what Schemas derived from may find it
ironic that it is Microsoft who may be breaking the data 
model here.

///Peter



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.