Das eez kaput! Sometime around 2002 I spaced the entire database table that mapped individual entries to categories. Such is life. What follows is a random sampling of entries that were associated with the category. Over time, the entries will be updated and then it will be even more confusing. Wander around, though, it's still a fun way to find stuff.
So, if it's known that :~foobar works at :~workplace it stands to reason that there's no reason to write the same thing twice. Rather, the correct approach would be to reference the latter's work phone number in the former's work phone definition.
There doesn't appear to any way to do this RDF; specifically to
reference a discreet subset of another resource's properties. I was
able to find a proposal descrbing
a fragment identifier syntax [in] RDF
but it is only a
proposal and already three years old.
More importantly, my own needs for this kind of data involve being
able to process it with XSLT. No, I haven't had a sudden change
of heart about RDF/XML, but judicious use of xsl:template match
= "..."
has made it suck just a little less.
Enter XInclude. The following is valid RDF that doesn't really help
you connect the dots in a directed graph context but since you can't
do that anyway, it doesn't cost you anything either. On the other hand
it makes managing, and rendering, disparate but related pieces of data easier
.
<rdf:li rdf:parseType = "Resource"> <xi:include xi:href = "x-urn:aaronstraupcope:knows:who:~workplace" xi:xpointer = "xmlns(r=http://www.w3.org/1999/02/22-rdf-syntax-ns#) \ xmlns(f=http://xmlns.com/foaf/0.1/)xpointer(*// \ r:Description/r:type[@r:resource= \ 'http://xmlns.com/foaf/0.1/Org']/following-sibling::* \ [name()='vcard:TEL']/r:type[@r:resource= \ 'http://www.w3.org/2001/vcard-rdf/3.0#work']/parent::*/ \ child::*)" /> <!-- I am still trying to figure out why IsaViz spazzes out when I add a xi:fallback directive --> </rdf:li>
You may want to poke your eyes out after looking at that for too long but, then, nothing's for free and it's the kind of hairiness that could fairly easily be hidden by a GUI client. It goes without saying that the query itself could be optimized.
If, like me, you are using URNs as URIs you'll need to add corresponding
rewriteSystem
entries in your catalog.xml file so that
the XInclude processor is able to resolve the path to the resource
you're pointing to.
<rewriteSystem systemIdStartString="x-urn:aaronstraupcope:knows:who:~" rewritePrefix="file:///path/to/you/know/who/" />
Later: the following fixes the bugs described above and
doesn't care whether or not phone numbers are wrapped in a
rdf:Bag
container. It also makes sure that only telephone
numbers for a specific resource are included, in case there are
multiple resources defined in a single document:
<xi:include xi:href = "x-urn:aaronstraupcope:knows:who:~workplace" xi:xpointer = "xmlns(a=x-urn:aaronstraupcope:knows:who:~') \ xmlns(r=http://www.w3.org/1999/02/22-rdf-syntax-ns#) \ xmlns(f=http://xmlns.com/foaf/0.1/) \ xpointer(*//r:Description[@r:about= \ 'x-urn:aaronstraupcope:knows:who:~workplace' \ ]/child::*[namespace-uri()= \ 'http://www.w3.org/2001/vcard-rdf/3.0#' \ and local-name()='TEL']/descendant-or-self::*/ \ r:type[@r:resource='http://www.w3.org/2001/vcard-rdf/ \ 3.0#work']/parent::*/child::*)" />
I will post these stylesheets in the next day or so...
#!/bin/sh # currently requires the saxon:distinct() # function- I gather the xsltsl libraries # define similar hooks but I haven't tested # them yet # I know this isn't how you're supposed to # load java thingies : me.the.java.way.can.Bite() EXEC_SAXON='javavm -jar /usr/local/share/java/classes/saxon.jar' # XSL_EXPAND inherits : # /home/asc/lib/xsl/rdf/expand-resources.xsl # base class/framework for expanding resources # /home/asc/lib/xsl/rdf/expand-wordnet.xsl # the rdf wordnet output is especially verbose # so we perform some additional hoop-jumping # /home/asc/lib/xsl/rdf/expand-asc-knows.xsl # glue to expand x-urn:aaronstraupcope:* resources XSL_PRUNE='/home/asc/lib/xsl/jpegrdf/prune-exif.xsl' XSL_EXPAND='/home/asc/lib/xsl/jpegrdf/expand-resources.xsl' # dump.rdf is the output created by # jpegrdf -s ~/photos/*/*/*/*.jpg PHOTOS='/home/asc/photos' DUMP=${PHOTOS}/dump.rdf FINAL=${PHOTOS}/final.rdf # see below TMP1=${PHOTOS}/tmp1.rdf TMP2=${PHOTOS}/tmp2.rdf TMP3=${PHOTOS}/tmp3.rdf # first remove all the exif properties # except dateTime; further munge dateTime # into a resource ${EXEC_SAXON} ${DUMP} ${XSL_PRUNE} > ${TMP1} # do a first pass and try to expand # all the foreign resources in the # document - at a minimum this will # expand x-urn:asc:knows:where# / vcard # locality resources. think : # <rdf:Description rdf:about = "some-picture.jpg"> # <dc:coverage rdf:resource = "x-urn:asc:knows:where#montreal" /> # </rdf:Description> # <rdf:Description rdf:about = "x-urn:asc:knows:where#montreal"> # <rdf:type rdf:resource = "http://www.w3.org/2001/vcard-rdf/3.0#Locality" /> # <dc:title>Montréal</dc:title> # <vcard:Region rdf:resource = "x-urn:asc:knows:where#qc" /> # </rdf:Description> # <!-- and so on --> ${EXEC_SAXON} ${TMP1} ${XSL_EXPAND} > ${TMP2} # this is a pretty clunky approach but # it works as a proof of concept: do another # two passes over the output in order to # expand vcard locality/region and then # region/country resources. # a better way to do this would be to create # separate stylesheets to expand only regions # or countries since there may be other second # or third level resources that you don't care # about expanding. # at a minimum there are hooks to prevent the # same resource from being expanded twice in # the output document ${EXEC_SAXON} ${TMP2} ${XSL_EXPAND} > ${TMP3} ${EXEC_SAXON} ${TMP3} ${XSL_EXPAND} > ${FINAL} # clean up rm ${TMP1} rm ${TMP2} rm ${TMP3}
I have posted an XSL stylesheet for, more or less, converting XHTML 1.1 to the Atom syndication format.
I did this because as much I find the whole Atom thing extraordinarily tiresome I find all the hand-wringing from the RSS weenies even sillier. And given a chance to piss everyone off, I often jump.
I post this only as a
public service
. I have zero interest in maintaining this for anyone but myself. If you want to use it as fodder for a general purpose library, please be my guest.
I haven't bothered to remove private function calls and there is no documentation. However, there are comments enough for anyone with an understanding of XSLT to follow.
Update: this post generated much more interest than I anticipated so, for the curious, some background which has absolutely nothing to do with Atom (except maybe that Atom's content model maps better to my way of doing things than any of the various RSS efforts) :
The
XHTML
in question uses my
shiny new weblog format
which I wrote as a way to store
all
the data for a post in a static file. All the data but no form; foofy design stuff is added after the fact using, in my case,
XSL
. There are reasons why I didn't choose another, perhaps more expressive,
XML
application which will become clear below. I still use a database because it's faster for generating things like indexes but it is not considered authoritative. That is, the database
reads
from the flat files and not vice versa.
(It also lets me fob off the versioning
problem
on
CVS
and worry about other things.)
The single capital-R rule I've learned farting around with increasingly complex ways of generating this site is : the only thing you can count on is the web server being able to send plain vanilla HTML files — everything else will break. The only question you have ask yourself is how much pain will it cause and how much time you want to devote to fixing the problem.
Storing everything as XHTML and wasting a couple extra computrons on XML and XPath munging may not be pretty but when everything else fails at least the content is just there .
Meanwhile, this is sound of me adding a
buzzword-bingo
[meta] category to list all the damn acronyms used in any given post...
The version number only reflects the fact that the documentation is incomplete. Let the bug reports begin...
minimalAtom feeds. I will get around to the fancier feeds, but don't hold your breath. If someone wants to take the work and run with it, please feel free to do so.
Update: Well, this proved to be a pretty trivial task. I have munged about 98% of a
maximal
Atom feed into
RSS
1.0. I don't expect the
multipart content
feed or the
RSS
2.0 stylesheet to be anymore complicated. I guess I will try and post all of this tomorrow morning.
Up your date: So, it's all done. Save the widget to convert a
W3CDTF
date string to a
RFC822
date string which is making me feel, well, funky. Fortunately,
someone else has already done most of the heavy lifting
. Oh yeah, and some kind of kludge to deal with the fact the
XSL
spec seems to be seriously brain-dead when it comes to generating
<![CDATA[ ]]>
sections. But not tonight — there is a hockey game to watch...
Is that a date in your pocket? Steve Ball is my hero, even if the markup:cdata-section template is broken. And it goes without saying that the logic for fussing with dates in RSS 2.0 will result in bug reports. Life sucks — but often less than date processing. I will finish up some rudimentary documentation and post a tar ball this afternoon (Sunday.)
Not much of interest has happened during the last week.
Unless you count the spat over XML error handling, which I don't. It was a controversial decision : I'm shocked! It's been borne out to be a good decision, HTML notwithstanding : Shocked, I tell you!
I briefly considered posting an open letter to television news executives imploring them to let, no force, their on-air personalities to wear toques when it's - 40° Celcius outside. If not for their sake then for the impressionable young children watching them.
A bunch of stuff got upgraded on the machine that serves as the
staging
server for this weblog and now the fancy-pants program that does all the heavy lifting, generating pages and indexes, is dumping core whenever the
XSLT
function
aa:permalink()
is called. I leave it as an exercise to the reader to find the Deep and Meaningfuls in that one.
I'm not overly concerned about this, right now. It will get fixed but I'm not going to turn my life upside down over it. And some pretty awful stuff has happened in the neighbourhood, recently, that helps keep things in perspective.
In the meantime, this is one of the best stories I've heard in a long time:
“You killed my girlfriend's fish. No, you made her kill her fish.”
mt
API methods. This is probably it for version 0.86 but I don't have the time to finish debugging right this moment so I throw it out for the brave and reckless. see also changes; note that the HTML docs have not been updated yet.I am so with the Idea of RDF but it's never going to happen, certainly not the way people who wax poetic about it seem to imagine. RDF strikes me as the datetime problem writ large, an increasingly pendantic debate to define what the meaning ofEfforts in the past to herd all the existing module authors towards a common API have failed, so rather than try that again, I decided to just write even more datetime code. As we all know, the best way to put out a fire is to pour copious amounts of gasoline on it. In order to make my project sound cool, I'm calling it the "Perl DateTime Suite", which sounds much better than "more date and time modules".
is
is. By way of example, a careful reader will note that
during the discussion of Daylight Savings Time in article cited no mention is made of the fact that Saskatchewan doesn't
bother with the practice at all; most farmers are bit too busy for that kind of thing and who can blame them? So fine, go
ahead and add another ruleset your RDF thingy but sooner or later all RDF thingies are just going to be little more than a collection of monster
if/else statements (because the farmers aren't going adopt DST just to make your whiz-bang network enable font of knowledge
happy. In every essay I've seen about RDF, the author say something to the effect of why is something so simple, so hard for people to understand?The answer is pretty straightforward : because, for good or ill, people are hell-bent on making it difficult. Why, if RDF is so simple, does it have all this baggage? What the hell is a
Class
and why
do I need to care? Why, if all this nonsense, is meant for machines do people push as something that humans should feel all
warm and fuzzt about? RDF is a perfectly good framework for exchanging data and describing things. Period. But please stop
thinking that it is a suitable vehicle for condensing all of human experience and automating human interaction. see also :
strikes me as more event-like than freebusy-like and
banque de déppanage linguistique which, with a
name like that, ought to tell you something.
Maybe we've all been barking up the wrong tree with RSS and all the other syndication formats. Maybe we should just be storing everything as email messages...This module implements something relatively close to Jamie Zawinski's mail threading algorithm, as described by http://www.jwz.org/doc/threading.html. Any deviations from the algorithm are accidental.
float
property.
Roseate \Ro"se*ate\, a. [Cf. L. roseus, rosatus, prepared from roses. See {Roseal}, {Rose}.] 1. Full of roses; rosy; as, roseate bowers. 2. resembling a rose in color or fragrance; esp., tinged with rose color; blooming; as, roseate beauty; her roseate lips. {Roseate tern} (Zo["o]l.), an American and European tern ({Sterna Dougalli}) whose breast is roseate in the breeding season. web1913
roseate adj : having a dusty purplish pink color; "the roseate glow of dawn" [syn: {rose}, {rosaceous}] wn
A guy that you love to death but is too hard to get together with for reasons that are extremely annoying.
ex. Bob's a bit of a too hard basket case.
Disconcert \Dis`con*cert"\, n. Want of concert; disagreement. --Sir W. Temple. web1913
disconcert v 1: cause to feel embarrassment; "The constant attention of the young man confused her" [syn: {confuse}, {flurry}, {consternate}, {put off}] 2: cause to lose one's composure [syn: {upset}, {discompose}, {untune}, {discomfit}] wn
Sang-froid \Sang`-froid"\, n. [F., cold blood.] Freedom from agitation or excitement of mind; coolness in trying circumstances; indifference; calmness. --Burke. web1913
sang-froid n : great coolness and composure under strain; "keep your cool" [syn: {aplomb}, {assuredness}, {cool}, {poise}, {self-possession}] wn
Blandishment \Blan"dish*ment\, n. [Cf. OF. blandissement.] The act of blandishing; a word or act expressive of affection or kindness, and tending to win the heart; soft words and artful caresses; cajolery; allurement. Cowering low with blandishment. --Milton. Attacked by royal smiles, by female blandishments. --Macaulay. web1913
blandishment n 1: flattery intended to persuade [syn: {cajolery}, {palaver}] 2: the act of urging by means of teasing or flattery [syn: {wheedling}] wn
(adj) Reminiscent of the appearance or character of Dr. Zaius from _Planet of the Apes_.
ex. Her sublime head of red hair was exotically zaiesque.
Contravene \Con`tra*vene"\, v. t. [imp. & p. p. {Contravened}; p. pr. & vb. n. {Contravening}.] [LL. contravenire; L. contra + venire to come: cf. F. contrevenir. See {Come}.] 1. To meet in the way of opposition; to come into conflict with; to oppose; to contradict; to obstruct the operation of; to defeat. So plain a proposition . . . was not likely to be contravened. --Southey. 2. To violate; to nullify; to be inconsistent with; as, to contravene a law. Laws that place the subjects in such a state contravene the first principles of the compact of authority. --Johnson. Syn: To contradict; set aside; nullify; defeat; cross; obstruct; baffle; thwart. web1913
contravene v 1: go against, as of rules and laws; "He ran afould of the law"; "This behavior conflicts with our rules" [syn: {conflict}, {run afoul}, {infringe}] 2: deny the truth of [syn: {contradict}, {negate}] wn
Mien \Mien\, n. [F. mine; perh. from sane source as mener to lead; cf. E. demean, menace, mine, n.] Aspect; air; manner; demeanor; carriage; bearing. Vice is a monster of so frightful mien, As, to be hated, needs but to be seen. --Pope. web1913
mien n : dignified manner or conduct [syn: {bearing}, {comportment}, {presence}] wn
$MTCommentAuthorLink$
with automagically tags a name with some kind of URI, if present. You can configure MT to force people to include an email address when they submit a comment which, notwithstanding the ubiquitous bob@bob.com
, is understandable. You can also include an optional URI. The problem is that if you disallow anonymous comments and a user doesn't have, or doesn't include, a URL their email address gets stuck into the anchor tag. This is just bad form given the volume of spam-bots scraping the web. There are two hacks around this problem. The first is to update all your templates and change $MTAuthorCommentLink$
to $MTCommentAuthor$
, but this has the side-effect of never including an author's URL which may be cause for further annoyance. The second is to alter the conditional by hand, at lines 412-414, in MT::Template::Context.pm. Neither of these options are really very satisfying, though. Rather, this should be a configurable option in the mt.cfg file; something like MTCommentsAtNoSpam
. Unfortunately, none of the objects contained in the MT::Template::Context object contain instances of the MT::ConfigMgr object. In the days to come, I will submit a bugfix to pass $app->{ "cfg" }
as an argument to the Context.pm constructor...
my $we = new People; my $snow = new Enviroment ( type => 'cold' ); my $sleigh = new Transport ( for => $snow ); $sleigh->puller( new Horse ); $sleigh->dash( $snow ); $we->go( $fields, 'over' ); $we->do( 'laugh' ); $bell->ring; $spirits->set( bright => 1 ); $we->set_fun( 'lots' ) while ( $we->ride and $we->sing( about => 'sleighing' ); $bells->jingle; $bells->jingle; $bells->jingle while ( $we->travel ); $we->set_fun( 'lots' ) while ( $we->in($sleigh) ); $bells->jingle; $bells->jingle; $bells->jingle while ( $we->travel ); $we->set_fun( 'lots' ) while ( $we->in($sleigh) );
Assuming all the boring namespace setup, consider the following chunk of RDF to describe a person and their phone numbers:
Similarly, consider a second chunk of RDF to describe an organization and it's phone numbers: