How does the system get away with this?

A

AAaron123

How does the system get away with having closing tags without the
corresponding opening tags in web.config?

I create a new web site and find in web.config the following without opening
tags:

<appSettings/>

<connectionStrings/>

Is that OK?

Does it just mean no data of that kind?



Thanks
 
M

Mr. Arnold

AAaron123 said:
How does the system get away with having closing tags without the
corresponding opening tags in web.config?

I create a new web site and find in web.config the following without
opening tags:

<appSettings/>

<connectionStrings/>

Is that OK?

Does it just mean no data of that kind?

You should look up what those two tags are used for, because those are
configurable areas in the web or app.config that are configured by you the
programmer. And those are valid XML tags with no child tags.
..
 
A

AAaron123

Mr. Arnold said:
You should look up what those two tags are used for, because those are
configurable areas in the web or app.config that are configured by you the
programmer. And those are valid XML tags with no child tags.
.

I just didn't know xml allowed the only a closing tag.

Thanks
 
M

Miro

You will also notice the <BR> tag is done like this <br/>
(open up the "source and type in '<br>' it will convert it to <br/>

following the rules that if something like
<a href=,,,,,> </a>

why not a <br> </br> doesnt make sense.

So the br follows the single tag rule too. <br/>


Miro
 
A

AAaron123

I'm glad you stayed with me.
I didn't notice the slash was on the right side.
Don't know how I could miss that!

Thanks a lot
 
M

Mark Fitzpatrick

It's not a closing tag. </appSettings> would be a closing tag.

This is a self closing tag, or empty tag so the / is at the end.

<appSettings></appSettings>
becomes
<appSettings /> as both an opener and a closer.

A good example is the linebreak in xhtml. <br> then becomes <br /> since it
is self-closing.

Hope this helps,
Mark Fitzpatrick
 
J

Juan T. Llibre

re:
!> That's an informative appendix - conformance isn't necessary to be compliant with the standard

It looks to me like its a W3C *recommendation*.

http://www.w3.org/TR/2002/REC-xhtml1-20020801/

"This specification defines the Second Edition of XHTML 1.0..."

re:
!> conformance isn't necessary to be compliant with the standard

Isn't conformance obligatory with XHTML but not with HTML ?

i.e., in HTML you can get away with the <br> tag having no end tag,
but in XHTML the <br> tag must be properly closed ( <br /> ).





Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
=========================
 
A

AAaron123

Thank you
Mark Fitzpatrick said:
It's not a closing tag. </appSettings> would be a closing tag.

This is a self closing tag, or empty tag so the / is at the end.

<appSettings></appSettings>
becomes
<appSettings /> as both an opener and a closer.

A good example is the linebreak in xhtml. <br> then becomes <br /> since
it is self-closing.

Hope this helps,
Mark Fitzpatrick
 
G

Gareth Erskine-Jones

re:
!> That's an informative appendix - conformance isn't necessary to be compliant with the standard

It looks to me like its a W3C *recommendation*.

http://www.w3.org/TR/2002/REC-xhtml1-20020801/

"This specification defines the Second Edition of XHTML 1.0..."

The part quoted is paragraph C2, which is part of appendix C, which
starts:
C. HTML Compatibility Guidelines

This appendix is informative.
re:
!> conformance isn't necessary to be compliant with the standard

Isn't conformance obligatory with XHTML but not with HTML ?

HTML has to conform,. but only to HTML standards. XHTML has to conform
to XHTML standards.
i.e., in HTML you can get away with the <br> tag having no end tag,
but in XHTML the <br> tag must be properly closed ( <br /> ).

The question is whether the space before the "/" is needed for XHTML
conformance. So far as I can see it is not (it certainly doesn't
appear to be required by the DTD used by the W3C validator, and the
standards document quoted mentions using the space only as a measure
to assist existing HTML user agents in rendering the XHTML.

Which actual problems the space is supposed to help with I'm not sure.
A little googling suggests that some user agents might have trouble
identifying the end of an attribute value without the space (e.g. <br
id=alinebreak/>) but if the XHTML is conforming then the attribute
value would be quoted, so I'm not sure if that would be an issue.

Still, the people who write these documents are generally pretty
bright chaps, and so it's probably a good idea to follow their advice,
even when they aren't describing what is required for compliance with
the standard.

GEJ
 
J

Juan T. Llibre

re:
!> That's an informative appendix - conformance
!> isn't necessary to be compliant with the standard

Appendixes are part of the body of work which precedes them.
Anything in an appendix will conform with what was written in the main part of the work.




Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
=========================
 
G

Gareth Erskine-Jones

re:
!> That's an informative appendix - conformance
!> isn't necessary to be compliant with the standard

Appendixes are part of the body of work which precedes them.

Erm, yes.
Anything in an appendix will conform with what was written in the main part of the work.

The suggestion that a self closing tag have a space after the tag name
and before the / is in a section of the document clearly marked as
informative - one can comply with the standard without complying with
those suggestions. I'm not sure why this isn't clear - the document
isn't at all confusing.

GEJ
 
J

Juan T. Llibre

re:!> one can comply with the standard without complying with those suggestions

Where in the W3C site does it specify that ?

A definition of what both "informative" and "normative" mean is in order.

"Normative" indicates the details that specify what implementors should conform to.
"Informative", on the other hand, consists of examples and explanations.

"Informative" sections must be as respected as "normative" sections.

Please see :
http://lists.w3.org/Archives/Public/w3c-wai-eo/2008OctDec/0081.html

"In the world of standards there are two types of language: normative and informative.
Normative language states rules that must be followed to comply with the standard.

Informative language gives more readable descriptions, makes suggestions and is generally more friendly.

You must meet normative requirements.
Informative content helps you meet normative requirements."

Anything in an "informative" section of the W3C docs only helps
you to adhere to the "normative" section of the W3C docs.

i.e., you must adhere to whatever an informative section explains as if it was a norm.



Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
=========================
 
G

Gareth Erskine-Jones

re:
!> one can comply with the standard without complying with those suggestions

Where in the W3C site does it specify that ?
A definition of what both "informative" and "normative" mean is in order.

Here:

http://www.w3.org/TR/WCAG20/

(in appendix A)

That posting suggests the WCAG 2.0 specification as a source for the
definitions - that's the specification I've linked to. It specifically
says that "normative" means "required for compliance". The definition
of "informative" reads:
informative
for information purposes and not required for conformance
Note: Content required for conformance is referred to as "normative."


If the space in the self closing tag were required for conformance,
then as well as expecting the W3C validator to require that (which it
does not), I'd expect to see spaces in the examples given in the
standards document itself. Self closing tags are described in
paragraph 4.6 of the spec:
4.6. Empty Elements

Empty elements must either have an end tag or the start tag must end with />. For instance, <br/> or <hr></hr>.
See HTML Compatibility Guidelines for information on ways to ensure this is backward
compatible with HTML 4 user agents.

(the spec itself is at http://www.w3.org/TR/xhtml1/).

As you can see, the examples given don't have the space. The
compatibility guidelines mentioned are the informative appendix under
discussion.

I'm going to have to drop out of this one - I'm not sure that one
space is worth so many characters :). I do think the spec and the
terms used are pretty clear on this though.

GEJ
 
J

Juan T. Llibre

re:
!>>Where in the W3C site does it specify that ?
!>>A definition of what both "informative" and "normative" mean is in order.
!> Here:

Maybe sometimes the W3C speaks out of both sides of its virtual mouth ?

<g>

re:
!> I'm not sure that one space is worth so many characters :).

<chuckle>

We were reading different explanations, by the same W3C,
of what "normative" and "informative" means to them.




Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
=========================
 
G

Gareth Erskine-Jones

re:
!>>Where in the W3C site does it specify that ?
!>>A definition of what both "informative" and "normative" mean is in order.
!> Here:

Maybe sometimes the W3C speaks out of both sides of its virtual mouth ?

Definitely - and it mumbles too sometimes!
<g>

re:
!> I'm not sure that one space is worth so many characters :).

<chuckle>

We were reading different explanations, by the same W3C,
of what "normative" and "informative" means to them.


Yes, it's rather unsatisfactory to have to look in a different
standard for definitions of those terms. Odd too that they appear to
have two different ways of indicating what is needed for compliance
(there are the definitions of "may", "must" etc. too).

I've read that the DTDs are always to be considered authoritative for
a particular standard, which would be nice if true, but although I
can't recall where I read that, I'm pretty sure it wasn't in a W3C
document.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top