• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

XSL/XSLT or DTD?

 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys,

Which one would be the best thing to go for?
 
Rahul Bhattacharjee
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jothi Shankar Kumar Sankararaj:
Guys,

Which one would be the best thing to go for?


Go for what ?
;)

XSLT/XSL and DTD are not related topics.DTD's are used for validation of xmls and XSL/XSLT are used for transforming XML's.
 
Benjamin Wang
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To validate, we should use xml schema.
To create XML from XML, we should use Xquery.
To get specific element, we can use XPointer or XPath.
To transform the data, we can use xsl.
 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
XSL defines the style of the xml document. Did I get this wrong?

Maybe xml schema/DTD....which one would be ideal for XML validation?
 
Muhammad Saifuddin
Ranch Hand
Posts: 1324
Android Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Rahul Bhattacharjee:

DTD's are used for validation of xmls and XSL/XSLT are used for transforming XML's.
 
Rahul Bhattacharjee
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jothi Shankar Kumar Sankararaj:
XSL defines the style of the xml document. Did I get this wrong?

Maybe xml schema/DTD....which one would be ideal for XML validation?


XSL are for structuring of xml's . true , very true.

I have never seen XSL are validated.I think well formness in this case is enough.
I have also not worked much on XML , so lets wait for an expert to comment on this.
Anyways wish me luck , I am appearing IBM 142 tomorrow.
 
Shapra Benglur
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
>>XSL defines the style of the xml document. Did I get this wrong?

Maybe xml schema/DTD....which one would be ideal for XML validation?>>

XSL Transformations can be used, for example, to generate an HTML version of your XML document. For XML validation, DTD or XSD (Schema) may be used. Schema allows for better control of occurence, types etc.

Quoting from the Developer works article (Part 2 of 5)

".. You can design an XML Schema to constrain your document to a greater degree than is possible by using the DTD. For example, an XML Schema grammar can specify that exactly four apple elements must always be the immediate children of a basket element. You can define complex types, building on string types. For instance, you could require a zipcode element to have a pattern facet of value "\d\d\d\d\d-\d\d\d\d", so that values such as "95123-4823" are valid, but "abcde-fghi" or "27703" are invalid..."

Here's the link to the 5 part prep series:

Test Prep
[ June 11, 2007: Message edited by: Shapra Benglur ]
 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks guys for all your post!

Good luck Rahul for the exam!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic