Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xsl] php xml xsl transformation returning empty string

From: andrew welch <andrew.j.welch@--------->
To:
Date: 10/2/2005 11:07:00 AM
On 10/2/05, nalopaleaahu@xxxxxxx <nalopaleaahu@xxxxxxx> wrote:
> Hmm I thought the closing xml was well formed, I was wrong. Thanks

Really?  With no matching opening <xml> how could you think it was well
formed?

> Now I dont get parsing errors now but the transformation is not
> returning anything new, just the comment segment as it was before

Your source XML doesn't have a comment segment...

> rdfpic.xsl:
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns="http://www.w3.org/TR/REC-html40"
> xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
> xmlns:DC="http://purl.oclc.org/dc/documents/rec-dces-199809.htm#"
> xmlns:Technical="http://www.w3.org/2000/PhotoRDF/technical-1-0#"
> version="1.0">
> <xsl:output method="html" indent="no"/>
> <xsl:template match="/">
> <xsl:apply-templates/>

You've called apply-templates here, but don't have any other templates
in your stylesheet...

> <xsl:for-each select="*">
> <xsl:value-of select="@name"/>:
> <xsl:value-of select="*"/>
> </xsl:for-each>

There isn't an attribute 'name' in your source - what were you
expecting to select here?  It's probably best to take some time out
and learn xml and xslt outside of php...

> </xsl:template>
> </xsl:stylesheet>
>
>
> xml array data is:
> <?xml version="1.0"?>
> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
>   xmlns="http://www.w3.org/1999/09/28-Photo-ns#"
>   xmlns:DC="http://purl.oclc.org/dc/documents/rec-dces-199809.htm#"
>   xmlns:Technical="http://www.w3.org/2000/PhotoRDF/technical-1-0#">
>  <rdf:Description about="for awhile">
>   <DC:Description>Take one</DC:Description>
>   <DC:Type>image/jpeg</DC:Type>
>   <DC:Subject>computers</DC:Subject>
>   <DC:Source>ccd</DC:Source>
>   <DC:Rights>public domain</DC:Rights>
>   <DC:Title>Lets get this working</DC:Title>
>   <DC:Date>2005-04-20</DC:Date>
>   <DC:Coverage>USA</DC:Coverage>
>   <DC:Creator>Me</DC:Creator>
>   <Technical:devel-date>2005-05-01</Technical:devel-date>
>   <Technical:lens>Minolta AF70-210</Technical:lens>
>   <Technical:camera>Minolta800i</Technical:camera>
>   <Technical:film>Fuji</Technical:film>
>  </rdf:Description>
> </rdf:RDF>


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent