Re: [xslt] newbie question
- From: Daniel Veillard <veillard redhat com>
- To: xslt gnome org
- Subject: Re: [xslt] newbie question
- Date: Fri, 10 Aug 2001 17:25:28 -0400
On Fri, Aug 10, 2001 at 03:05:13PM -0600, darrell dupas wrote:
>
> i have been tinkering with xsltproc and the heavily ms oriented xslt
> tutorial at w3schools,
>
> http://www.w3schools.com/xsl/xsl_choose.asp
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
Those examples are using the OLD OLD working draft syntax.
Instead if ranting in this list you should send your rant to the
people maintaining this page. THIS IS NOT XSLT ! This is supported
only by specific version of Microsoft browser.
> to get the simple examples to work with xsltproc you must change the
> namespace tag, and add version="1.0", and indeed i have done a few
> simple transformations, however the xsl:if and xsl:choose are not
> working for me, i am unsure what is wrong with the xpath in the expression
>
> <xsl:if match=".[ARTIST='Bob Dylan']">
>
> if i read this correctly the dot means the current node in the for each,
> and the ARTIST node should be inside the nodes returned by the
> following selector:
>
> <xsl:for-each select="CATALOG/CD">
that's exact
> i am getting frustrated with the lack of practical examples on xpath ,
> and yes i read http://www.w3.org/TR/xpath.html, also i have found the
You're doing a big mistake: taking a specification, which assume a lot of
knowledge of background as a learning documentation. This is not intended
for this, this won't work in most cases. I really suggest you get a book
or a (correct) web tutorial.
Don't get me wrong, specs are essential, but they are not learning guides.
> lack of explanation of URI vs. URL frustrating, please correct me if i
> am wrong, they are essentially the same thing except that a uri is not
> necessarily an absolute or relative path, it may resolve to different
> locations, they don't specify protocol like <!DOCTYPE html PUBLIC
> "-//W3C//DTD HTML 4.01 Transitionl/EN">is a uri because it could be at
> any W3C ? ah, i will keep on ....
There is no URL nor URI nor URI-Reference in the excerpt you provided.
You are confusing a public identifier wich is sucha a string with a system
identifier which is an URI-Reference. The spec for URI/URL etc... is the
RFC 2396. But I don't suggest you try to read it now. I suggest you
get a general book on XML/XSLT.
> i am planning on making a basic xml database program using libxml2, one
> small hint about the xslt equivalent of the SQL insert into would be
> nice? just a clue please, you don't need to provide an example, or
> perhaps i should use the c api instead of xslt?
Again you are confused. XSLT is not the proper tool for updating a
database using XML as the serialization. XSLT is a transformation/styling
tool, it creates new document it does not transform its input.
Using directly libxml2 API to add or modify nodes is a more sound
approach.
Daniel
--
Daniel Veillard | Red Hat Network http://redhat.com/products/network/
veillard@redhat.com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]