[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
Re: [xml-dev] (In)Validate My Assumptions on Linking.
- From: Ari Krupnik <ari@cogsci.ed.ac.uk>
- To: xml-dev@lists.xml.org
- Date: Thu, 28 Sep 2006 21:02:52 -0700
Ben Trafford <ben@prodigal.ca> writes:
> 1) Stylesheet languages need some sort of way to display links
> from generic XML. This is so we can interact with them in user
> agents. By "stylesheet languages," I am specifically referring to
> XSL-FO and CSS.
I think FO is less of a target for this effort because you cannot
"apply" FO to arbitrary XML - you have to build an XSL-FO document
based on your source XML, so the marginal cost of having to put XLinks
or fo:basic-links into the transformed document is trivial.
> 3) XLink is -conceptually- on the right side of the
> 80/20. Forget the syntax, and focus on the actual ideas -- do they
> cover what needs to be covered? Especially if it were possible to
> easily extend them in the future.
I don't know how common of a use case this is, but I've often found
myself writing
<a href="{@link}">
<xsl:apply-templates/>
<xsl:if test="not(node())">
<xsl:value-of select="@link"/>
</xsl:if>
</a>
<example>See <a href="http://example.com/~john">John's blog</a> and
<a href="http://example.org/weird"><!-- I can't be bothered to think
of a good title for it now, so just show the URL to the reader-->
</a>.</example>
CSS can almost do it, but has no way to differentiate between elements
that have content and empty elements:
a[href]:before {
content: attr(href);
}
Ari.
--
Elections only count as free and trials as fair if you can lose money
betting on the outcome.
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]