December 2001 Meeting Notes

Submitted by usda_organic on Sat, 12/15/2001 - 1:00am.
  • XSLT Templates
  • Schemas and DTDs
  • SVG Discussed
  • gzipped HTML Revelation
  • Attendees
  • base64_encode function
  • PHP Users Group Meeting

    Attendees: Tim McGuire J. Wynia Allie Micka H.J. Schmidt Fred Hathaway David Peiper Noah Bratzel Bruce Green Jay Meyers Tom Anderson Dennis Nagen Lyno Sullivan
    1. Next Meeting: January 9. Teamstudio, a company that makes a PHP IDE called TeamStudio Express is sponsoring the meeting and giving out free t-shirts and pens.
    2. O'Reilly sent us of review copies of their new books and we distributed them at the meeting. (yes, three of them are about Java, but we are a pretty inclusive group):
      • J. Wynia will review Java and XSLT
      • David Pieper will review Java and XML
      • Tim will review Java Cookbook
      • H.J. will review EXIM
    3. PHP function of the day: BASE64_ENCODE() and BASE64_DECODE().This allows you to put a stream of binary code right in your php page that would represent an image or a sound file or other binary data. That way you have that in your file instead of somewhere else in the file system and it is impossible to link to that from another page. I turned a simple page with an image on it into a 3000 lines of binary code! http://php.holtsmark.no/base64img/

      2. Allie gave a presentation at the Webgrrls bootcamp on PHP. http://www.webgrrls.com/twincities_mn/events/bootcamp.html

      3. J. Wynia gave a presentation on XML and XSLT templating.

      • One of the best things about XML is that it does not destroy the data in the act of sending it to the presentation layer.
      • Best Editor is XML spy "Nothing Else Touches it".
        • $200. 30 day free trial.
        • Has a wizard that produces schema for given xml file.
        • SOAP support
      • The best XML Parser that J. found was the Microsoft MSXML (Now called Microsoft XML Core Services) product. "It was 6 times faster than PHP."
      • When you have one XML document and need to send it to an application (database, spreadsheet, application) expecting a different format, you can use the schema of the target application's XML to convert yours to a form that the other will recognize.
      • XML allows cross application communication because each application presents an XML version of their API.
      • XML/ XSLT uses:
        • SVG
        • FOP (generating PDFs from XML)
        • Remote procedure calls (XML-RPC or SOAP)
        • Device control

    4. What is XSLT?
    5. DTDs (Document Type Definitions) and Schemas.
      1. What are they? Schemas and DTD do the same thing: They contain a series of rules that a given XML document must conform to.
      2. DTDs and Schemas accompany the XML document.
      3. If you are just interacting with your own applications, or eating your own dog food as J. called it, you don't need schemas or DTDs to do your transformations. However, to accept outside XML and send your XML to other applications, devices, etc., schmemas and DTDs are what tells the outside world how your XML is set up.
      4. The schema standard is now ( as of August of 2001) a W3C recommended standard.
      5. Schemas are XML while DTD's are in some language all its own that looks similar to BCNF
      6. Short table showing some differences between DTDs and Schemas:
        DTDSchemas
        Not coded in XML. This means that the file that accompanies your .xml file and is meant to describe it for other applications your .xml file is not itself XML Coded in XML. The self describing part of your document is XML itself. That means that you can do the same things to it and with it that you can do with XML.
        Not Extensible. As it is not XML, it is not extensible. Extensible. Using namespaces, a schema can point to an outside resource (URL, file, etc) to get information about how the XML it is responsible for should be defined or described. The possibilities start to be endless when the namespace is a URL extended by a queryusingthe?var1=foo&var2=bar syntax
        Closed content model - everything that is in the XML document has to be mentioned in the DTD. Open Content Model - Can have stuff in XML document that is not addressed in schema.

        Not accessible from the DOM of whatever application you are using.

        Accessible from the DOM. (For example, the schema can be read with javascript within an SVG viewer or an XML compatible browser)

        There is more, but one starts to get the idea that DTDs are on the way out.

    6. J.'s project at 3M using Java, XSLT, and a relational database:
    7. Q: Whats a good way to get started doing a simple project with XSLT templating? A: (from J.)
      • choose a simple web page (like the contact us page)
      • make xml file defining every single element on your page
      • build the xslt that transforms it into HTML for example ; <email>osama@torabora.com</email>
        gets transformed to <a href=mailto:osama@torabora.com>drop me a line!</a>
      • run the two through a parser.
      • now you have the information (company name, email, address phone,) in a format where it is easily extracted (you can find an email in an xml file a lot easier than in an html file)
      • Yes, you could do something just like this with one of the PHP template products. However, only php could use these templates. The advantage to XML/XSLT solution is that languages/platforms/applications outside of php can use the same xslt/xml for their own purposes.
      • GOOD EXAMPLE: J. posted some more PHP/XML material from his presentation here.
      • generating actual PHP code through xml/xslt would be a tough proposition.
    8. SVG discussion ( led by J.)
    9. An apache module called mod_gzip compresses http before sending it and modern browsers automatically uncompress these files.
    10. Change php.ini output handler = '....' to redirect all output to a function
    11. Hosting with Root access on linux: www.webpipe.net $35.00 per month.
    12. Spooky paypal story. The upshot is that once fraud occurs through your paypal account, paypal is so automated and understaffed that you cannot get them to stop charging your credit card or bank account. J. was reduced to cancelling his credit card and closing the bank account associated. Dont use paypal! <
    13. Meeting Notes Posted by Tim McGuire