Topic: 10 minutes in XML??? |
Print this page |
1.10 minutes in XML??? | Copy to clipboard |
Posted by: floater Posted on: 2002-12-17 11:03 Could anyone give me a 10-minutes-in-XML lession? (Comparing with 14days in XML, etc, ) Suppose I have a database(oracle, sybase, etc). I want to display the data in html pages. What are the steps to go from db to html? db are maintained by dba, sql will be used to query/operate data. html prototypes are generated by graphics designers, html code and css. What are the roles in the middle? What are the middle supplementals, like xsl, dtd, etc? Using java, supposed. No code is necessary, but tools are better than general comments. Thanks. |
2.Re:10 minutes in XML??? [Re: floater] | Copy to clipboard |
Posted by: wishmaster Posted on: 2002-12-17 15:47 don't really understand what you intend to do... but, anyway, use JDBC to grab data from database, use JSP to present data. This is the way in Java, in this case, I am not sure why you need XML, even you really want XML output, then you only need XSL to style your data and DTD or schema to validate your XML structure. What you mentioned in your post is more of templating and often used in content management system such as Interwoven TeamSite or Vignette V5. |
3.Re:10 minutes in XML??? [Re: floater] | Copy to clipboard |
Posted by: wishmaster Posted on: 2002-12-17 17:11 floater wrote: nd Edition.part1.rar (976.56k) |
4.Re:10 minutes in XML??? [Re: floater] | Copy to clipboard |
Posted by: wishmaster Posted on: 2002-12-17 17:18 nd Edition.part2.rar (976.56k) |
5.Re:10 minutes in XML??? [Re: floater] | Copy to clipboard |
Posted by: wishmaster Posted on: 2002-12-17 17:23 nd Edition.part3.rar (697.24k) |
6.O'Reilly - XML In Nutshell 2nd Edition Uploaded [Re: wishmaster] | Copy to clipboard |
Posted by: wishmaster Posted on: 2002-12-17 17:26 This XML book should serve the purpose....but may take more than 10 minutes to read then... |
7.Re:10 minutes in XML??? [Re: wishmaster] | Copy to clipboard |
Posted by: floater Posted on: 2002-12-18 00:42 wishmaster wrote: Here is a skeptical chart of the flow. The green ones are java classes, we don't need to worry about them(assume we know everything about them since there are tools out there already). The blue ones are of my concern! CSS is relative easy, photoshop + dreamweaver + frontpage can do it and it is done during prototyping.(any comment on this???) But DTD and XSL are problematic. I know *how* to do these, that's not the issue here. My problem is who and when these should be done, any tools to simplify these developments. For example, is there any tool to visualize dtds(note that we have plenty of tools to check sql tables, right?). In the same fasion, is there any tool for xsl? Since blues are input to java files, and some we have to create them, my focus is on who(roles) and when(dependencies) to create them. By seperating the processes to create them, I could further understand the functionalities of each and make them flexible to each other(loosely coupled and concurrently-developing). Sorry if I misled you. Don't worry about jdbc, jsp or content management since we are using xml, but not templating. We know or will know how to do this flow with xml(BTW, thanks for the book). But I just want to refine the process to create these artifacts(dtd, xsl). Cocoon has a similar flow to this, so are several others. I've done a little, but not an expert on this. Apparently, it needs more experience to see through than what I know. |
8.look here [Re: floater] | Copy to clipboard |
Posted by: coder Posted on: 2002-12-18 16:14 you can see my last post, I recommend a good site you can master xml in ten minutes by learn the Tutorials & References and some xsl tools. If you want to refine the process, there is my option: 1. define the DTD 2. generate the sample xml(It is used to be test xml by xsl) 3. a group generate the real xml a group generate the xsl refer to the html may I get one point? |
9.Re:look here [Re: coder] | Copy to clipboard |
Posted by: floater Posted on: 2002-12-19 00:12 coder wrote: This is just the same as my process, am i right? I also read your post already before I posted here. It's helpful, but not quite getting there. I think my question is more archetectural than technical. |
10.my option [Re: floater] | Copy to clipboard |
Posted by: coder Posted on: 2002-12-19 11:15 我还不善于用英语表达想法(这是我最佩服各位的啦),为避免词不达意,所以用中文了 1. DTD的生成可以省略。所有数据采用一种xml格式,DTD不用也可以。 2. 你的流程图好像只是数据浏览,如果是这样,可以考虑使用xsql技术,一行java代码都不用写,而且性能非常好。 |
11.Re:10 minutes in XML??? [Re: floater] | Copy to clipboard |
Posted by: wishmaster Posted on: 2002-12-19 15:02 floater wrote: |
12.Re:look here [Re: coder] | Copy to clipboard |
Posted by: wishmaster Posted on: 2002-12-19 15:10 coder wrote: You need to truly understand the problem and solve them as possible as you can.... |
13.Re:my option [Re: coder] | Copy to clipboard |
Posted by: floater Posted on: 2002-12-20 02:27 coder wrote: Hehe, just a way to make a living. In fact, I wish I could express this in chinese. Yea, you are right, dtd is optional, but just to be on the safe side. In fact, I think this chart is also for the update screen, when we have to populate existing data for users to update. Could you explain more on xsql? A combination of sql and XML, like wishmaster mentioned that most databases already have XML output? |
14.Re:10 minutes in XML??? [Re: wishmaster] | Copy to clipboard |
Posted by: floater Posted on: 2002-12-20 02:55 wishmaster wrote: Here is the new chart in visio format, it's too large to fit in a screen, so I can't take a picture of it. I took all your comments and put them in it. Any new comment is welcome. As I mentioned earlier, the format is who does what and when. I did some xml programming two years ago, and I used notepad. It was a prototype for some project. Now it's time to revisit this again. Fortunately, there are some seasoned developers here. Thanks for all the input and experience sharing. XMLPrototypes.vsd (68.5k) |
15.xsql info [Re: floater] | Copy to clipboard |
Posted by: coder Posted on: 2002-12-20 10:03 XSQL Oracle 公司开发的 Oracle XML Devleper Kit(简称 XDK)的一个组件。 更多信息请看 http://technet.oracle.com/tech/xml 只是一个简单Demo 1. URL格式: http://yourcompany.com/AvailableFlightsToday.xsql?City=NYC 2. AvailableFlightsToday.xsql <?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="FlightList.xsl"?> <xsql:query connection="demo" bind-params="City" xmlns:xsql="urn:oracle-xsql"> SELECT Carrier, FlightNumber, Origin, TO_CHAR(ExpectedTime,'HH24:MI') Due FROM FlightSchedule WHERE TRUNC(ArrivalTime) = TRUNC(SYSDATE) AND Destination = ? ORDER BY ExpectedTime </xsql:query> 3. 如果注释引入xsl的那句,就会直接输出xml |
16.Re:10 minutes in XML??? [Re: floater] | Copy to clipboard |
Posted by: floater Posted on: 2002-12-21 00:02 thanks for the info. I'll go to the link. |
17.Re:xsql info [Re: coder] | Copy to clipboard |
Posted by: wishmaster Posted on: 2002-12-21 16:38 coder wrote: http://msdn.microsoft.com/downloads/default.asp?url=/downloads/sample.asp?url=/msdn-files/027/001/824/msdncompositedoc.xml Here is the microsoft solution for SQL XML which simplifies XML output and other related operations...very easy to use |
18.Re:10 minutes in XML??? [Re: floater] | Copy to clipboard |
Posted by: irisjacky Posted on: 2003-01-07 11:01 The following websites and tutorials are part of the ones I get into XML . I can't remeber all because I have read too much material about this. I just try my best to recall. 1.www.xml.com (run by publishers O'Reilly) is an excellent source of articles on all topics XML. 2. http://www-106.ibm.com/developerworks/xml/library/x-xslt5.html This will be useful when you begin writing XSLT stylesheets 3.James Clark explains XML Namespaces. http://www.jclark.com/xml/xmlns.htm 4. http://www.zvon.org/ is an excellent tutorial website for XML begginner 5. http://www.w3schools.com/ is another terrific resource let begginner to experience web technology including XML 6. Attached please find some slides from a very good australian xml technology company. From my point of view, I prefer xml schema to DTD. First of all, DTD is not a rich enough language to specify all XML applications. Furthermore,DTD uses a non-XML syntax( needs different tools to process). On the contrary, XML Schema languages is a XML based languages, which does provide all of the capabilities of DTD and more. XML schema also maintain and extend the idea of document validity . However, it doesn't mean DTD is dead. Someone still argue that xml schema is more complex than DTD. You may need to decide which technology to use due to your customer's needs. Actually, the construction of some may component in webservices including UDDI, WSDL, SOAP are using the idea of xml schema. In adddition, I think it is important to point out some new technology like RELAXNG which provides more powerful xml processing. Here is a interesting article talking about comparison between xml schema and relaxng http://www.xml.com/pub/a/2002/01/23/relaxng.html Regard to XSLT, as I suggest in other post, it does provide you a very powerful presentation transformation template, which normally used together with Servlet processing. Here I list some brief advantage of XSLT. 1. XSLT can be used to separate data, program, logic and presentation 2. XML and XSLT can be developed independently of servlet code 3.Modularity of presentation improves maintenance 4.Can target multiple client devices via different stylesheets The only weakness I can see is that it adds layer of abstraction and extra step, slower runtime performance. If you want to know more, I do recommend you read the book called <<java and xslt>> which give you a beautiful idea of XSLT processing and how to integrate it with J2EE. I don't know whether FTP contain it or not because I don't have the access to FTP. If not, I can upload one ebook which cost a lot bucks to buy one from O'reilly. Another interesting thing about xml is that xml technology provide the normal function of database rather than presentation logic only. XML is self-describing, portable and has rich expressiveness to represent any tree or graph structure. elementary storage (XML documents) schemas (DTD.s, XML Schema) query languages (XQuery, XPath) programming interfaces (SAX, DOM, JDOM All of these are DB features, aren't they? Of course, xml is not a complete DB. it doesn't provide transation management and so on. I don't want to mention anymore in the case that all of you may be expert in DB. In the beginning ,floater talking about what are the steps to go from db to html? It is really up to how you store the xml data into DB. There are many methodology available now. I just point out one to make you have some taste. You can store xml as string (Character Large Object). Store each top level element as a string field of a tuple in a database. Use a separate relation for each top-level element type. Store values of subelements/attributes as extra indexes Benefits: Can store any XML data even without DTD as long as there are many top-level elements in a document, strings are small compared to full document, allowing faster access to individual elements. Drawback: Need to parse strings to access values inside the elements; parsing is slow. There you go! I just briefly go through the interesting piont of xml technology I can remeber now. Hope it helps you a bit. I do think XML is a terrific technology and provide us much much much more than most people normally think. That's why SUN, IBM, MICROSOFT.... treat it as a big thing. Finally, whatever background you have or how intelligent you are, it is totally booshit to learn a technology in 10 minutes or even so called "14 days". s_Comp_Soc_3hour.pdf (481.75k) |
19.Re:10 minutes in XML??? [Re: floater] | Copy to clipboard |
Posted by: wishmaster Posted on: 2003-01-07 11:53 what floater really meant is higher-level book knowledge in XML, not specific about the syntax, this is what I think. |
20.Re:10 minutes in XML??? [Re: irisjacky] | Copy to clipboard |
Posted by: floater Posted on: 2003-01-07 12:39 irisjacky wrote: Wishmaster is right, I was just asking for a high level, functional-wise view of transferring xml to xhtml, not any specific tech details. The reason I restrict to 10 min is to abstract the implemental details out of what we *really* have to do. For example, using dtd or xml schema doesn't matter, we count as one step and leave the decision to later on; similar to sax or dom. Thanks anyway. I like your last comment, , that's why I hate those books. b*llsh*t indeed. I was partially making fun of it. |
21.Re:10 minutes in XML??? [Re: floater] | Copy to clipboard |
Posted by: wishmaster Posted on: 2003-01-07 13:08 floater wrote: I know you were simply putting together a rough project plan... |
22.Re:10 minutes in XML??? [Re: wishmaster] | Copy to clipboard |
Posted by: floater Posted on: 2003-01-08 12:48 wishmaster wrote: Nay, I just thought about this for the future, otherwise I wouldn't put the doc(visio file) on the net. Basically, I just want to factor out the invariants from the variants. I have some experience on XML, but not extensive. |
23.Re:10 minutes in XML??? [Re: floater] | Copy to clipboard |
Posted by: jackycct Posted on: 2003-02-14 15:32 You may consider using the following approaches : 1. Servlet/JSP serves the incoming request 2. Processing the request/Invoke corresponding service handler, which in turns will interact with the database and constructs the results in DOM objects. 3. Forward the DOM objects to the presentation layer (e.g. another JSP) 4. JSP renders the XHTML using the DOM objects by itself, or with the use of tag libraries or XSLT. The advantages of this approaches : 1. The JSP can be authored by web designers since it's very similiar to HTML 2. Only the minimial required data is required to be generated in DOM object. 3. Separation of presentation, data, and business logic. Hope the info about can give you some idea.... If the info is invaluable, would you do me a favor by adding a point for me? I would like to get the WhizLabs OOAD testing simulator |
Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1 客服电话 18559299278 客服信箱 714923@qq.com 客服QQ 714923 |