File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Order of elements in DD

 
Wim van Haaren
Greenhorn
Posts: 18
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 39
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 20
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As of the servlet spec 2.4, the elements under web-app can be in an arbitrary order( spec page 106).
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic