aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Order of elements in DD Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Order of elements in DD" Watch "Order of elements in DD" New topic
Author

Order of elements in DD

Wim van Haaren
Greenhorn

Joined: Nov 04, 2004
Posts: 18
The DTD for web.xml version 2.3 clearly defines the order in which the elements must occur. The schema for version 2.4, however, now defines the sub-elements of <web-app> through a choice, which means that the ordering of the sub-elements has been let go of in the new version.

Am I correct to assume that (for the 1.4 exam) the order of sub-elements of <web-app> are arbitrary and that therefore for example <servlet> can occur before <filter>? Or even something like
<servlet>
...
</servlet>
<filter>
...
</filter>
<servlet>
...
</servlet>
<filter>
...
</filter>

Thanks,

Wim
Sami Sayeed
Ranch Hand

Joined: Oct 05, 2004
Posts: 39
Hi,

Look at the XSD,

If the XSD is using a <xsd:sequence> construct to declare the lements one must follow the sequence if, there are no xsd:sequence you are free to use the elements without any order,

Sami
Omar Dziri
Greenhorn

Joined: Oct 06, 2004
Posts: 20
As of the servlet spec 2.4, the elements under web-app can be in an arbitrary order( spec page 106).


Master degree in computer systems,<br />SCJP 1.4,<br />SCBCD 1.3,<br />SCWCD 1.4,<br />SCDJWS(in progress)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Order of elements in DD