473,394 Members | 1,740 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

XML: pros and cons

Hi friends I'm a newbie learning XSLT to transform an XML to some other
documents. Now I have some questions, anyone could give me some suggestions
on them?

1. If we save our documents in XML rules and these files should be published
on Internet through WWW, what we can benefit from the XML files? And what
are the drawbacks (is it too complex or time-consuming because we have to
define a new set of XML elements to save the documents, and write the XSLT
to transform them to XHTML)? Is it more convenient to use XHTML+CSS?

2. The transformation from XML to XHTML using XSLT can be completed on
server side (such as cocoon) or client side. I know transformation on client
side can bring some compatibility problems because older web browers cannot
recognise and complete the transformation. But on the other hand,
transformation on server side may consume the server resources. Are there
any other advantages/disadvantages for the transformation on
server-side/client-side and what are they?

3. During the learning process, I touched some small exercises on the DTD to
define the XML elements, and I found it sufficient to describe the XML tree
structure and I don't know why we introduced a new Schema to replace DTD.
What are the advantages of using Schema, besides it is written in XML? And
where can I find the Schema is more powerful and flexible than DTD?

Thank you all,

Regards,
Jul 20 '05 #1
2 1975
"Zhou Lei" <da*********@hotmail.com> wrote in message news:<d083i4$c52>
1. If we save our documents in XML rules and these files should be published
on Internet through WWW, what we can benefit from the XML files? And what
are the drawbacks (is it too complex or time-consuming because we have to
define a new set of XML elements to save the documents, and write the XSLT
to transform them to XHTML)? Is it more convenient to use XHTML+CSS?
In HTML you can directly specify presentation(like bold text,
hyperlinks etc..) along with data. If your objective is just to
publish information on web, I feel HTML is a good choice. You can
easily create HTML in popular HTML editors and serve it via a standard
web server. Publishing content via HTML has no transformation overhead
(which XSLT has). But if you are getting XML generated by some
application and need to show it on web, then definitely you have to
transform it into HTML. This you can do using CSS or XSLT. CSS would
allow you to add advanced presentation to HTML (but would not provide
advanced transformation capability as XSLT does). XSLT would allow you
to perform advanced transformation/filtering/calculations on XML. You
can apply XSLT on the server side or client side. The server side
approach will be ideal if your goal is to cater to all the browsers.
As not all browsers support XSLT in the same way. You may even combine
CSS and XSLT (both on server as well as client side). The choice will
depend upon exact requirement..
2. The transformation from XML to XHTML using XSLT can be completed on
server side (such as cocoon) or client side. I know transformation on client
side can bring some compatibility problems because older web browers cannot
recognise and complete the transformation. But on the other hand,
transformation on server side may consume the server resources. Are there
any other advantages/disadvantages for the transformation on
server-side/client-side and what are they?
The XSLT transformation on server side is advantageous if you need to
cater to all browsers (as server will send only HTML to the browsers).
If your need to cater to maximum clients is of utmost importance, then
you have to bear the transformation overhead! But today server
platforms are quite powerful, so I feel it should not be problem.. The
advantage of XSLT processing on client side would be benificial,
because it will relieve the server from transformation overhead (Also
you will not need to install any additional software like XSLT
processor, JVM etc.. You can just place XML and XSLT files on web
server, and they will be served to client over standard HTTP protocol,
where transformation will be performed)
3. During the learning process, I touched some small exercises on the DTD to
define the XML elements, and I found it sufficient to describe the XML tree
structure and I don't know why we introduced a new Schema to replace DTD.
What are the advantages of using Schema, besides it is written in XML? And
where can I find the Schema is more powerful and flexible than DTD?

XML Schema is definitely more advantageous than DTD. You can specify
more constraints on XML using Schema than DTD. It provides useful data
type system, which allows you to specify data types on XML elements..
Data typing is quite useful, as it helps to eliminate bugs at a very
early stage of application development.. DTD has a very restricted
type system.. Having meta-data about XML in XML format(i.e. XML
Schema) has various other advantages.. You can manipulate XML Schema
using standard XML parsers, and can do XSLT transformations on them..

I think I have only mentioned few of the points!

Regards,
Mukul
Jul 20 '05 #2

"Mukul Gandhi" <mu**********@yahoo.com> ????
news:b1**************************@posting.google.c om...
"Zhou Lei" <da*********@hotmail.com> wrote in message news:<d083i4$c52>
1. If we save our documents in XML rules and these files should be published on Internet through WWW, what we can benefit from the XML files? And what are the drawbacks (is it too complex or time-consuming because we have to define a new set of XML elements to save the documents, and write the XSLT to transform them to XHTML)? Is it more convenient to use XHTML+CSS?

In HTML you can directly specify presentation(like bold text,
hyperlinks etc..) along with data. If your objective is just to
publish information on web, I feel HTML is a good choice. You can
easily create HTML in popular HTML editors and serve it via a standard
web server. Publishing content via HTML has no transformation overhead
(which XSLT has). But if you are getting XML generated by some
application and need to show it on web, then definitely you have to
transform it into HTML. This you can do using CSS or XSLT. CSS would
allow you to add advanced presentation to HTML (but would not provide
advanced transformation capability as XSLT does). XSLT would allow you
to perform advanced transformation/filtering/calculations on XML. You
can apply XSLT on the server side or client side. The server side
approach will be ideal if your goal is to cater to all the browsers.
As not all browsers support XSLT in the same way. You may even combine
CSS and XSLT (both on server as well as client side). The choice will
depend upon exact requirement..
2. The transformation from XML to XHTML using XSLT can be completed on
server side (such as cocoon) or client side. I know transformation on client side can bring some compatibility problems because older web browers cannot recognise and complete the transformation. But on the other hand,
transformation on server side may consume the server resources. Are there any other advantages/disadvantages for the transformation on
server-side/client-side and what are they?

The XSLT transformation on server side is advantageous if you need to
cater to all browsers (as server will send only HTML to the browsers).
If your need to cater to maximum clients is of utmost importance, then
you have to bear the transformation overhead! But today server
platforms are quite powerful, so I feel it should not be problem.. The
advantage of XSLT processing on client side would be benificial,
because it will relieve the server from transformation overhead (Also
you will not need to install any additional software like XSLT
processor, JVM etc.. You can just place XML and XSLT files on web
server, and they will be served to client over standard HTTP protocol,
where transformation will be performed)
3. During the learning process, I touched some small exercises on the DTD to define the XML elements, and I found it sufficient to describe the XML tree structure and I don't know why we introduced a new Schema to replace DTD. What are the advantages of using Schema, besides it is written in XML? And where can I find the Schema is more powerful and flexible than DTD?

XML Schema is definitely more advantageous than DTD. You can specify
more constraints on XML using Schema than DTD. It provides useful data
type system, which allows you to specify data types on XML elements..
Data typing is quite useful, as it helps to eliminate bugs at a very
early stage of application development.. DTD has a very restricted
type system.. Having meta-data about XML in XML format(i.e. XML
Schema) has various other advantages.. You can manipulate XML Schema
using standard XML parsers, and can do XSLT transformations on them..

I think I have only mentioned few of the points!

Regards,
Mukul


Thanks for your reply, I think I will continue to learn Schema...
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

112
by: Andy | last post by:
Hi All! We are doing new development for SQL Server 2000 and also moving from SQL 7.0 to SQL Server 2000. What are cons and pros for using IDENTITY property as PK in SQL SERVER 2000? Please,...
1
by: krammer | last post by:
Hello, Can any one please give me a short but concise pros and cons list of Unicode support in both SGML and XML? long story short, we are gonna port our leagacy SGML files to XML and the new...
2
by: Jim Williams | last post by:
**** Post for FREE via your newsreader at post.usenet.com **** I'm working on a 3d engine system. I need to save/load data in the systems objects to/from XML files. When I say objects, I mean...
2
by: scott | last post by:
Hi, Just wondering what sort of problems and advantages people have found using stored procedures. I have an app developed in VB6 & VB.NET and our developers are starting to re-write some of the...
1
by: Lucas Fletcher | last post by:
Hi All, I've searched the web for an article explaining the many tradeoffs between storing your XML in a database vs the filesystem but I haven't really found anything of note. This is the...
6
by: P Jones | last post by:
Hi, I support an enterprise web application (IE client) built in VB6, with about 200 classes, serving about 7000 users, running on 3 clustered servers. I need to incorporate web reporting for...
3
by: Andrea | last post by:
Hello everyone, I'd like to know which are the main pros and cons of using XML implementation in business organizations. >From a technical perspective, I find XML powerful, but looks like it is...
1
by: Joel H | last post by:
I'm designing a medical record system and am considering using XML in the database (native SQL Server XML datatype). I'm looking for advise and opinions as to whether my rational is good, and to...
6
by: surfivor | last post by:
I may be involved in a data migration project involving databases and creating XML feeds. Our site is PHP based, so I imagine the team might suggest PHP, but I had a look at the PHP documentation...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.