W. Scott Means

Greenhorn
+ Follow
since Sep 27, 2001
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by W. Scott Means

Thanks to all of you for giving me a chance to come in and talk to you about XML! Good luck with all of your future projects!
------------------
W. Scott Means
author, Strategic XML
smeans@strategicxml.com

Originally posted by Guillaume Compagnon:
Thx U a lot for your tips, Scott!
as a former from MS, do you know any initiative from Microsoft Office in order to improve MSXML and to deploy XML in Word application ( a "Save as XML file" button in Word) ?


Sorry, I've been out of the loop. I left back in '93, and things have changed a LOT since then. Most of my friends are either retired or too high-up in the organization to really know what is going on :-)
------------------
W. Scott Means
author, Strategic XML
smeans@strategicxml.com

Originally posted by ruilin yang:
I saw XML was used to generate Database schema. Does your book discuss topics on XML database applications. For example, we may use it to losely couple different database systems for an application to get information from different databases at the same time. Something like database integration.
Please comments on this.
Thanks,
Ruilin


The book does have an entire chapter that talks about different database options for dealing with XML data. It talks about the difference between mapping XML data over a relational schema vs. using a true XML database.
As for more exotic things like generating database schemas from XML, it doesn't do any of that.
------------------
W. Scott Means
author, Strategic XML
smeans@strategicxml.com

Originally posted by Raseswari Achanta:
<?xml version="1.0"?>
<!DOCTYPE DOCUMENT[
<!ELEMENT DOCUMENT (Head,Body)>
<!ENTITY % PCD "(#PCDATA)">
<!ELEMENT Head %PCD;>
<!ELEMENT Body %PCD;>
]>
<Document>
<Head>
Title goes here
</Head>
<Body>
This is the document.
</Body>
</Document>


Unfortunately, you can't do that. If you look at the XML 1.0 specification, it's illegal to use a parameter entity as a PART of a markup declaration in the internal subset. This was to simplify the job of people who write non-validating parsers. If you moved your declarations into an external subset and referenced it using the SYSTEM keyword of the <!DOCTYPE> declaration it would work fine. There are a few strange little quirks like that in XML.
------------------
W. Scott Means
author, Strategic XML
smeans@strategicxml.com
You're right, the XML parser is trying to interpret the &pCustId... part of your attribute value as an entity reference. To fix it, you'll need to escape the & by writing it as:
Now, without actually trying this myself, I'm afraid that XSLT might escape the & on output, yielding a hyperlink that looks like FindRowKey.jsp?pCustid=1234&amp;pAct=E. If this is the case, you'll need to use the <xsl:attribute> element to build the href attribute and use the <xsl:text disable-output-escaping="yes"> element to include the &. I hope this helps!
------------------
W. Scott Means
author, Strategic XML
smeans@strategicxml.com
[This message has been edited by W. Scott Means (edited October 18, 2001).]
You don't need to escape the @ character. As for the < character, if there will be a lot of them you will probably want to enclose them in a CDATA section, like this:
If you're putting them in an attribute value, you'll probably need to use the built-in < entity or a character reference (& I believe.)
------------------
W. Scott Means
author, Strategic XML
smeans@strategicxml.com
I thought I'd let this thread rest for a while to see what everyone else had to say. Obviously, I must think that there are strategic uses of XML, or I wouldn't have bothered to write the book :-)
And Guillaume is right, there is a huge potential for misapplying the technology and generating more headaches for yourself. But when used to solve the right sorts of problems, there really aren't any substitutes.
------------------
W. Scott Means
author, Strategic XML
smeans@strategicxml.com
Here's your stylesheet with an <xsl:if> element that seems to do what you want. There is an interesting issue that occurs since you're sorting them descending. The preceding-sibling axis is actually pointing to the NEXT element that will be emitted. Other than that, it's pretty straightforward:

------------------
W. Scott Means
author, Strategic XML
smeans@strategicxml.com
[This message has been edited by W. Scott Means (edited October 17, 2001).]

Originally posted by Guillaume Compagnon:
Moreover, anyone knows differents adapters for transforming XML (respecting a DTD or Shema) into PDF, or Word ...
URLs are welcome!


XSL Formatting Objects can be used to transform XML into PDF, albeit indirectly. You need to use a tool like Apache's Fop (Formatting Objects Processor) to take the XSL-FO document and convert it to PDF. The whole transformation process looks like this:
XML document + XSLT Stylesheet = XSL-FO document
XSL-FO document + Fop = PDF
You can find Fop on the Apache XML Project site.
I actually wrote an XML to Word converter a couple of years ago and taught a course on it at the SDExpo show this spring. You can see the presentation and the source code (it's a Word VBA application) on my web site. The class was called XML & Microsoft Word.
------------------
W. Scott Means
author, Strategic XML
smeans@strategicxml.com

Originally posted by Manjunatha HA:
Hi Scott, i am presently working on developing a customized langauge based on XML, for maintaining say News Content. Does your book Handle regarding creation of customized languages??


Nope, and I've been trying to gauge the demand for a book on XML design principles. Just as an informal poll, would people be interested in a book that talks about how to build new XML applications. The steps to go through when designing a DTD and/or Schema for a new language? How to design a good namespace architecture? Modularity and making your application suitable for inclusion in other applications?
Even though XML isn't really a programming language, there's definitely well-designed XML and poorly designed XML.
------------------
W. Scott Means
author, Strategic XML
smeans@strategicxml.com

Originally posted by Manjunatha HA:
Hi,
Whats the role of XML, regarding personalization of any content, which is the buzz word today . Does the book handle this issue of personalization?

Thanks and Regards
Manjunatha
[This message has been edited by Manjunatha HA (edited October 17, 2001).]


I don't go into personalization explicitly in the book. But building an XML-based infrastructure is definitely a good first step to building a personalized (and customizable) system. Without XML, building a web site that had multiple "skins" or different UIs for different users would be very time consuming. By separating content and presentation, it makes the problem managable. Not easy, but at least manageable.
------------------
W. Scott Means
author, Strategic XML
smeans@strategicxml.com

Originally posted by ravindra ch:
does this book has any real time applications?i am curious about this book?
thanx
ravindra


If by real time, you mean embedded, nope -- sorry. I know that Java's becoming more important all the time in embedded applications, and it would make sense that XML would be making its way down there eventually. But since high-performance was never really part of the design goals of XML there would be some work to do to build fast, small parsers.
As an aside, my next book (due out by the end of the year or beginning of January) is called The Book of SAX, and it includes a small, Java-based SAX parser. It's < 20K compiled and is relatively fast.

------------------
W. Scott Means
author, Strategic XML
smeans@strategicxml.com
The decision about when to store data in XML and when to store it in another format is definitely a tough one. In most cases, XML is a _great_ transport mechanism for moving data from one platform to another. For instance, enabling your mainframe to export information in XML format and then importing it into a web server for transformation and display is a great use of XML. Storing information that doesn't fit neatly into a relational database schema is another case. For instance, if you have a hierarchical data structure that doesn't translate to a table/join structure, you might want to store that as XML in a database column.
But an XML document makes a poor database. It's large, slow, and you can't (easily) do complex joins on the information in it. For very small applications where you might have been tempted to do a flat-file or ISAM database, XML might be right. But in general relational data belongs in the database, unstructured content belongs in XML.
As for serializing Java objects via XML, there have been several efforts in that direction. Yes, using the native Java serialization format is more compact. But it's also a closed loop. You won't be able to take that BLOB and feed it to an XSLT processor and display a nice web page. Or take it and send it to a mainframe that will extract some information during a batch cycle.
So if you know that the data will never leave your closed system, by all means use the most compact and speediest means to store information. But if you even suspect that the content will be useful to another system, or you might want to build a web service around it, make it available in XML. It doesn't cost that much, and makes life much easier down the road.
------------------
W. Scott Means
author, Strategic XML
smeans@strategicxml.com
[This message has been edited by W. Scott Means (edited October 17, 2001).]

Originally posted by Chris Chen:
I have seen the book companion page, it's rather helpful. But, is there anything about taglib?


Nope, sorry. Nothing in the book about taglib.
------------------
W. Scott Means
author, Strategic XML
smeans@strategicxml.com

Originally posted by ruilin yang:
Yes xhtml is different from xml. xhtml uses some xml in html. xhtml also include some other technologies, such as javaScript, etc.
My question is xhtml is not the main intention of the xml stratigy ?


I think I missed this in his original post. XHTML is simply a reformulation of HTML as a valid XML application. For example, you can no longer write something like this:

You must write:

There are also several hooks for extending the basic XHTML application, but its primary purpose is to provide a path for the web to migrate from HTML-based documents to XML-based documents in the long term. The theory being that first you support XHTML (which is an XML dialect), then the jump to XML documents is not so large.
------------------
W. Scott Means
author, Strategic XML
smeans@strategicxml.com