Reply to RE: [PHP] XSL problem

Your name:

Reply:


Posted by Jared Williams on 04/19/05 02:00

> ===================
> Problem: can't retrieve the "1" from the ERRORCODE tag.
>
> I've narrowed down the source to the xmlns attribute inside
> the FMPXMLRESULT tag. Still can't figure out how to code it
> to grab the "1" though. Any ideas? I've tried:
>
> /ERRORCODE
> FMPXMLRESULT/ERRORCODE
> /FMPXMLRESULT/ERRORCODE
> FMPXMLRESULT/@xmlns/ERRORCODE
>
> and nothing works.
>
>
> =======(XSL)==========
>
> <xsl:template match="/">
> <OrganizationName><xsl:value-of
> select="ERRORCODE"/></OrganizationName>
>
>
> =======(Source XML)==========
>
> <FMPXMLRESULT xmlns="http://www.filemaker.com/fmpxmlresult">
> <ERRORCODE>1</ERRORCODE>

This is a namespaces related I think, you need to define a the namespace in the stylesheet, common place is on the <xsl:styleseet>
element together, then use the prefix

<xsl:stylesheet xmlns:fm="http://www.filemaker.com/fmpxmlresult" ...

<xsl:template match="/">
<OrganizationName><xsl:value-of select="fm:FMPXMLRESULT/fm:ERRORCODE" /></OrganizationName>

Jared

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация