Home

Advertisement

Jun. 24th, 2007

Dent

Continued reading and some new software...

I’m continuing to read Definitive XML Schema and have learned a few more things. XSD documents can be “chained” together if they share the same name space. This is particularly useful when you have various charm groups that have “extra/ non-standard” elements. Example: the <learning /> element from the Sidereals or <restriction /> from the Abyssals.

I’ve also run across some nifty software for OS X.

Seashore: A cocoa based Mac “optimized” version of GIMP.
Witch: A task switcher that allows selection among many open windows.
ProVoc: A testing tool (i.e. school testing) that allows you to create lists of words that include audio, dictionary, and video components. Designed to assist you learn another language but that isn’t its only use.

See what I can do:



It’s probably not as good as what [info]democritus6 can do but I thought it was cool.

Jun. 21st, 2007

Seashore

I wonder if there is a maximum capacity to what you can learn? (And other high points to my week.)

Thus far I’m on chapter 3 of Definitive XML Schema. From what reviewers have said, up till chapter 9 most of this stuff is background information on XML Schemas. Although chapter 3 does bring up the subject of XML Name Spaces (xmlns) which I will talk about in a moment or so.

Yesterday, I was given a Mighty Mouse by a customer. Most non-Apple computer users might consider this a non-issue but it was really nice. To begin with the mouse retails for $50 USD (which I no longer have to spend) and it gives me the ability to do right clicks. Which makes dealing with certain things (eg. zipping files together) much easier. {Hey, no snickering!}

Also yesterday, I watched MacBreak’s video cast and found a nifty piece of software for Safari users. What I didn’t realize, until later, was that my preferred browser Camino already has that kind of functionality built in (this also applies to Firefox users).

In a nutshell, the software allows you to type a “keyword” into the address/location bar and have that mapped to a specific URL. What is even more impressive about this is that you can append to the URL additional data (which follows the keyword). This makes is particularly useful for search queries.



How to do this is easy but it takes some looking and configuration to set it up.
  1. Open Bookmark Manager
  2. Create a new Bookmark
  3. Bring up it’s Properties/Info
  4. Put the desired “keyword” into the Keyword/Shortcut field
  5. Fill out other fields as desired

To make “appendable” links, you first get a search URL and then replace your keyword with %s.


XML Name Spaces

Most who monitor this blog, probably also watch [info]malfeas, so this will be some explanation on a comment I made there.

In simplest terms, a “name space” is a container in which you can hold: attribute, elements, and values. This makes it easier to combine two different XML files together in a single document. (Like last weeks example of charms and sorcery being combined into a single file.)

Name spaces typically take the form of a URL but that URL doesn’t have to point to anything in particular (or at all, for that matter). XSL and XSD documents are both “name space aware”, so in order to use them you have to add any necessary name spaces.

EDIT: Oh, one thing that I almost forgot. Attributes can be assigned to a specific name space (they don’t necessarily inherit from their parent element).

Jun. 14th, 2007

Seashore

Spending and some more XML stuff...

Thus far, I have been spending cash like water. Most of this is due to things that either have to be paid (bills) or things that need to be fixed (my car). I am fortunate that I have some savings and thus it is not going to hurt me too much in the long run. Regardless, I’m not happy with the necessity of spending so much.

On the subject of spending, I really need to spend more time working out. Typically, I run about 15 minutes every night but as of late illness and lack of time have been preventing me from doing so.

Does anyone know of a OS X compatible dice roller that uses conventions found in Storyteller games (i.e. no summation of the die results)? Has anyone seen (or preferably played) the Exalted board game War of the Throne?

XML Stuff:

In my reading of XML Primer Plus, I’ve come to some “conclusions” (subject to revision as I learn more). XML name spaces, can/are used to combine elements from different XML documents. This is particularly useful if you have to reuse elements (aka. <charm />).

For instance:


<data xmlns=”http://anathema.sourceforge.net/charms”
xmlns:srcy=”http://anathema.sourceforge.net/sorcery”
xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”
xsi:schemaLocation=
“http://anathema.sourceforge.net/charms ../charms.xsd
http://anathema.sourceforge.net/sorcery ../sorcery.xsd”>
<charm>
<id>solar.shadowstrike</id>
<duration>instant</duration>
</charm>
<srcy:sorcery>
<srcy:id>solar.celerityoftherisingsun</srcy:id>
<srcy:target>one</srcy:target>
</srcy:sorcery>

</data>


XML schema’s are fabulously complex and thus incredibly useful. You can make groups of various things: attributes, elements, value lists, etc. You can specify in much greater detail what contents are valid. Since it is hierarchical based, it deals better with repeated elements (aka. <charm />) that have different children or attributes.

You can combine XML Schema’s with name spaces to validate a document against two different schema’s. Which is particularly useful in the above example code. Sorcery has only 3 elements vs the minimum of 5 for most Charms.

I’ve also learned some interesting things about XSL. Apparently, there is an <xsl:transform xmlns:xsl=http://www.w3.org/1999/XSL/Transform" version="1.0" /> element. I didn’t realize that such an element existed, in part because none of my example documents used it, but according to the author of my book, it is being used more often now.

It also gives me a way to tinkering with the “Transformation” aspect of XSL. I would need to get a software called Xalan which would allow me to utilize this. All I need to do is type in (assuming I can get it “installed” correctly):

java org.apache.xalan.xslt.Process -IN (Some XML Document) -XSL (Some XSL Document) -OUT (Some Document)

OR

java -jar path/to/xalan.jar -IN (SOME XML DOCUMENT) -XSL (SOME XSL DOCUMENT) -OUT (SOME DOCUMENT)

It would make mass conversion of XML documents relatively easy, assuming you didn’t have another way of doing the same thing.

Aside:Now to pickup my car and spend $160 US.

PS. Learning is always good but being able use that knowledge is better. Yes, I’m being enigmatic but that’s my prerogative.
Tags: , ,

Apr. 29th, 2007

Seashore

I cheated but I'm nearly there...

Apparently, there are some software pieces that will convert DTD's into various other validation schemes including XML Schema and Relax NG.  I happened to be perusing the Relax NG site and found one called Trang.  It works like a charm.  Now to figure out why it doesn't like the W3.org's XML namespace...
Tags: , ,
Seashore

Going into debt for a good cause...

I think that I've found some books that might be useful when working on some of my Anathema related projects.  I've noticed that authors of XML books tend to be verbose (a good thing) but, given the page count, the price is fairly high.

XML Primer Plus
ISBN: 0672324229
Retail: $49.99 USD
Pages:  800
Link:  Amazon

Definitive XML Schema1
ISBN: 0130655678
Retail: $52.99
Pages:  528
Link:  Amazon

XML: Language Mechanics and Applications
ISBN: 0201771683
Retail: $75.20
Pages:  656
Link:  Amazon

Looking at new copies from vendors that I trust puts the price at $144.  If I trusted eBay, I might be able to take $34 off that total.  Now to figure out how to pay for all this and not end up on the street...

1.  Apparently, Ms. Priscilla Walmsley has a website setup for this book at:  Definitive XML Schema Examples.  They have an example chapter, that I will have to look at.
Tags: , ,

Apr. 26th, 2007

Seashore

It's a short road, getting from there to here...

My week, thus far, in review:

  • DTD vs. XML Schema
    • DTD's easy to read, write, and understand.  XML Schema's are none of the above (which explains Relax NG).
    • XML Schema's have more flexibility in validating data and they are well-formed XML.
      • DTD's have either CDATA or specified data.
        • CDATA, could be anything.
        • Or you have to make a specific list to validate against (which can get quite long).
      • You can create patterns within XML Schemas. (# = number)
        • ISBN = #-####-####-#
        • PH# = #-###-###-####
I have realized that I need a better book, if I continue to do XML Schema's.  My current book XML Step by Step, 2nd Edition sucks, in regards to most XML things.  Which stands to reason when you notice that it is by Microsoft Press.  Half the book is about XML "data binding", a MS specific version of XSL, 25% of the book is CSS, and the remainder is a mix of XML, DTD, XSD and XSL.  Consider space requirements, none of the important topics are covered in any great depth.  Which makes online resources a must but I haven't found a good source yet.

I fixed the WIFI connectivity between my MacBook and my Belkin router.  Apple issued a patch to fix WEP last month which broke WPA encryption to my access point.  On a lark, I changed my router from WPA-TKIP to "WPA/WPA2" and it now works.  I think I'm going to send a letter asking Belkin what is different between the two modes.

Yesterday, I received a 320Gb "My Book" by Western Digital.  I planned to use this to archive some large ISO's that were talking up 99Gb of space on my HD.  I ran into a problem copying the files off, though, which almost caused me to return the device.  This morning I had an epiphany that FAT had a 2Gb file size limit and wondered if FAT32 had a similiar limit.  It did (4Gb), which perfectly explains my problems moving over some of my ISO files.  A reformat to NTFS and 2 hours later, it is a done deal.

Activision just released some new content for Marvel Ultimate Alliance on Xbox 360, which has incited me to play that again.  Hopefully, I will be able to finish the game this time.  Previously, there was a "progression break" which prevented me from getting to the end.

I have, yet again, been hit with the reality that customer service jobs are terribly annoying.  Especially, when you get a person who insists on cover the same subject 3 dozen times (over 3+ hours).  Fortunately, I wasn't at work today when he came back!

Hopefully, the weather will clear in my part of the world so that I can go roller blading.  I just replaced my wheels and bearings and really want to get my money's worth out of them.

Advertisement

Customize