You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Simon Kelly <ke...@ipe.fzk.de> on 2003/05/21 15:23:17 UTC

web.xml element position

Hi all,

This is a bit of a daft question, but can someone tell me if the fact the
the web.xml file is defined by a DTD is the reason that you have to put the
elements in a certain order within the document.

Cheers

Simon the confused.

"I have often wondered how it is that every man loves himself more than all
the rest of men, but yet sets less value on his own opinion of himself than
on the opinion of others." -- Georg Christoph Lichtenberg

Institut fuer
Prozessdatenverarbeitung
und Elektronik,
Forschungszentrum Karlsruhe GmbH,
Postfach 3640,
D-76021 Karlsruhe,
Germany.

Tel: (+49)/7247 82-4042
E-mail : kelly@ipe.fzk.de


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: web.xml element position

Posted by Max Cooper <ma...@maxcooper.com>.
It isn't strictly that it is defined by "a" DTD that leads to the order
restrictions, but rather that it is definied by a DTD that restricts the
order. It would be a pain to write a DTD that allowed any order, but it is
possible.

-Max

----- Original Message ----- 
From: "Simon Kelly" <ke...@ipe.fzk.de>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Wednesday, May 21, 2003 6:23 AM
Subject: web.xml element position


> Hi all,
>
> This is a bit of a daft question, but can someone tell me if the fact the
> the web.xml file is defined by a DTD is the reason that you have to put
the
> elements in a certain order within the document.
>
> Cheers
>
> Simon the confused.
>
> "I have often wondered how it is that every man loves himself more than
all
> the rest of men, but yet sets less value on his own opinion of himself
than
> on the opinion of others." -- Georg Christoph Lichtenberg
>
> Institut fuer
> Prozessdatenverarbeitung
> und Elektronik,
> Forschungszentrum Karlsruhe GmbH,
> Postfach 3640,
> D-76021 Karlsruhe,
> Germany.
>
> Tel: (+49)/7247 82-4042
> E-mail : kelly@ipe.fzk.de
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: web.xml element position

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Wed, 21 May 2003, Adam Hardy wrote:

> Date: Wed, 21 May 2003 17:35:09 +0200
> From: Adam Hardy <ah...@cyberspaceroad.com>
> Reply-To: Struts Users Mailing List <st...@jakarta.apache.org>
> To: Struts Users Mailing List <st...@jakarta.apache.org>
> Subject: Re: web.xml element position
>
> Hi Mike,
> what is the syntax in the DTD that specifies the order? I couldn't find
> anything just now that seemed relevant. It just caught me out because I
> put in a JNDI resource-ref after the security-constraint, which don't
> affect each other at all.
>


Near the top of the DTD, you'll see a line that starts:

  <!ELEMENT web-app (icon?, display-name?, description?, ...

This is the content model describing what can go inside a <web-app>
element.  Because the content model uses commas, it is also an ordering
restriction.

See the XML 1.0 spec for more details (URL to an annotated copy of the
spec online can be found at <http://www.xml.com>).

Craig

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: web.xml element position

Posted by Adam Hardy <ah...@cyberspaceroad.com>.
Hi Mike,
what is the syntax in the DTD that specifies the order? I couldn't find 
anything just now that seemed relevant. It just caught me out because I 
put in a JNDI resource-ref after the security-constraint, which don't 
affect each other at all.

Mike Jasnowski wrote:
>  If you use an element that is not specified in the DTD< and you have
> validation turned on the XML parse will complain about your new element. .
> But you can also switch validation off even with a DTD specified. The only
> thing the XML parser will enforce by default is the well-formedness of the
> document.
> 
> -----Original Message-----
> From: Simon Kelly [mailto:kelly@ipe.fzk.de]
> Sent: 21. kvìtna 2003 9:44
> To: Struts Users Mailing List
> Subject: Re: web.xml element position
> 
> 
> So if a DTD does not specify the type and fequency, then any order following
> the basic element structure can be used?
> 
> Cheers
> 
> Simon
> 
> ----- Original Message -----
> From: "Mike Jasnowski" <mj...@bea.com>
> To: "Mike Jasnowski" <mj...@bea.com>; "Struts Users Mailing List"
> <st...@jakarta.apache.org>
> Sent: Wednesday, May 21, 2003 3:31 PM
> Subject: RE: web.xml element position
> 
> 
> 
>>Or rather type and frequency
>>
>>-----Original Message-----
>>From: Mike Jasnowski [mailto:mjasnows@bea.com]
>>Sent: 21. kvìtna 2003 9:31
>>To: Struts Users Mailing List
>>Subject: RE: web.xml element position
>>
>>
>>Yes, the DTD can specify order and frequency of elements in an XML
> 
> document.
> 
>>-----Original Message-----
>>From: Simon Kelly [mailto:kelly@ipe.fzk.de]
>>Sent: 21. kvìtna 2003 9:23
>>To: Struts Users Mailing List
>>Subject: web.xml element position
>>
>>
>>Hi all,
>>
>>This is a bit of a daft question, but can someone tell me if the fact the
>>the web.xml file is defined by a DTD is the reason that you have to put
> 
> the
> 
>>elements in a certain order within the document.
>>
>>Cheers
>>
>>Simon the confused.
>>
>>"I have often wondered how it is that every man loves himself more than
> 
> all
> 
>>the rest of men, but yet sets less value on his own opinion of himself
> 
> than
> 
>>on the opinion of others." -- Georg Christoph Lichtenberg
>>
>>Institut fuer
>>Prozessdatenverarbeitung
>>und Elektronik,
>>Forschungszentrum Karlsruhe GmbH,
>>Postfach 3640,
>>D-76021 Karlsruhe,
>>Germany.
>>
>>Tel: (+49)/7247 82-4042
>>E-mail : kelly@ipe.fzk.de
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: struts-user-help@jakarta.apache.org
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: struts-user-help@jakarta.apache.org
>>
>>
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: web.xml element position

Posted by Mike Jasnowski <mj...@bea.com>.
 If you use an element that is not specified in the DTD< and you have
validation turned on the XML parse will complain about your new element. .
But you can also switch validation off even with a DTD specified. The only
thing the XML parser will enforce by default is the well-formedness of the
document.

-----Original Message-----
From: Simon Kelly [mailto:kelly@ipe.fzk.de]
Sent: 21. kvìtna 2003 9:44
To: Struts Users Mailing List
Subject: Re: web.xml element position


So if a DTD does not specify the type and fequency, then any order following
the basic element structure can be used?

Cheers

Simon

----- Original Message -----
From: "Mike Jasnowski" <mj...@bea.com>
To: "Mike Jasnowski" <mj...@bea.com>; "Struts Users Mailing List"
<st...@jakarta.apache.org>
Sent: Wednesday, May 21, 2003 3:31 PM
Subject: RE: web.xml element position


> Or rather type and frequency
>
> -----Original Message-----
> From: Mike Jasnowski [mailto:mjasnows@bea.com]
> Sent: 21. kvìtna 2003 9:31
> To: Struts Users Mailing List
> Subject: RE: web.xml element position
>
>
> Yes, the DTD can specify order and frequency of elements in an XML
document.
>
> -----Original Message-----
> From: Simon Kelly [mailto:kelly@ipe.fzk.de]
> Sent: 21. kvìtna 2003 9:23
> To: Struts Users Mailing List
> Subject: web.xml element position
>
>
> Hi all,
>
> This is a bit of a daft question, but can someone tell me if the fact the
> the web.xml file is defined by a DTD is the reason that you have to put
the
> elements in a certain order within the document.
>
> Cheers
>
> Simon the confused.
>
> "I have often wondered how it is that every man loves himself more than
all
> the rest of men, but yet sets less value on his own opinion of himself
than
> on the opinion of others." -- Georg Christoph Lichtenberg
>
> Institut fuer
> Prozessdatenverarbeitung
> und Elektronik,
> Forschungszentrum Karlsruhe GmbH,
> Postfach 3640,
> D-76021 Karlsruhe,
> Germany.
>
> Tel: (+49)/7247 82-4042
> E-mail : kelly@ipe.fzk.de
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: web.xml element position

Posted by Simon Kelly <ke...@ipe.fzk.de>.
So if a DTD does not specify the type and fequency, then any order following
the basic element structure can be used?

Cheers

Simon

----- Original Message -----
From: "Mike Jasnowski" <mj...@bea.com>
To: "Mike Jasnowski" <mj...@bea.com>; "Struts Users Mailing List"
<st...@jakarta.apache.org>
Sent: Wednesday, May 21, 2003 3:31 PM
Subject: RE: web.xml element position


> Or rather type and frequency
>
> -----Original Message-----
> From: Mike Jasnowski [mailto:mjasnows@bea.com]
> Sent: 21. kvìtna 2003 9:31
> To: Struts Users Mailing List
> Subject: RE: web.xml element position
>
>
> Yes, the DTD can specify order and frequency of elements in an XML
document.
>
> -----Original Message-----
> From: Simon Kelly [mailto:kelly@ipe.fzk.de]
> Sent: 21. kvìtna 2003 9:23
> To: Struts Users Mailing List
> Subject: web.xml element position
>
>
> Hi all,
>
> This is a bit of a daft question, but can someone tell me if the fact the
> the web.xml file is defined by a DTD is the reason that you have to put
the
> elements in a certain order within the document.
>
> Cheers
>
> Simon the confused.
>
> "I have often wondered how it is that every man loves himself more than
all
> the rest of men, but yet sets less value on his own opinion of himself
than
> on the opinion of others." -- Georg Christoph Lichtenberg
>
> Institut fuer
> Prozessdatenverarbeitung
> und Elektronik,
> Forschungszentrum Karlsruhe GmbH,
> Postfach 3640,
> D-76021 Karlsruhe,
> Germany.
>
> Tel: (+49)/7247 82-4042
> E-mail : kelly@ipe.fzk.de
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: web.xml element position

Posted by Mike Jasnowski <mj...@bea.com>.
Or rather type and frequency

-----Original Message-----
From: Mike Jasnowski [mailto:mjasnows@bea.com]
Sent: 21. kvìtna 2003 9:31
To: Struts Users Mailing List
Subject: RE: web.xml element position


Yes, the DTD can specify order and frequency of elements in an XML document.

-----Original Message-----
From: Simon Kelly [mailto:kelly@ipe.fzk.de]
Sent: 21. kvìtna 2003 9:23
To: Struts Users Mailing List
Subject: web.xml element position


Hi all,

This is a bit of a daft question, but can someone tell me if the fact the
the web.xml file is defined by a DTD is the reason that you have to put the
elements in a certain order within the document.

Cheers

Simon the confused.

"I have often wondered how it is that every man loves himself more than all
the rest of men, but yet sets less value on his own opinion of himself than
on the opinion of others." -- Georg Christoph Lichtenberg

Institut fuer
Prozessdatenverarbeitung
und Elektronik,
Forschungszentrum Karlsruhe GmbH,
Postfach 3640,
D-76021 Karlsruhe,
Germany.

Tel: (+49)/7247 82-4042
E-mail : kelly@ipe.fzk.de


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: web.xml element position

Posted by Mike Jasnowski <mj...@bea.com>.
Yes, the DTD can specify order and frequency of elements in an XML document.

-----Original Message-----
From: Simon Kelly [mailto:kelly@ipe.fzk.de]
Sent: 21. kvìtna 2003 9:23
To: Struts Users Mailing List
Subject: web.xml element position


Hi all,

This is a bit of a daft question, but can someone tell me if the fact the
the web.xml file is defined by a DTD is the reason that you have to put the
elements in a certain order within the document.

Cheers

Simon the confused.

"I have often wondered how it is that every man loves himself more than all
the rest of men, but yet sets less value on his own opinion of himself than
on the opinion of others." -- Georg Christoph Lichtenberg

Institut fuer
Prozessdatenverarbeitung
und Elektronik,
Forschungszentrum Karlsruhe GmbH,
Postfach 3640,
D-76021 Karlsruhe,
Germany.

Tel: (+49)/7247 82-4042
E-mail : kelly@ipe.fzk.de


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org