W3C home > Mailing lists > Public > www-forms@w3.org > July 2002

XSLT and XForm doc namespaces

From: Calbazana, Al <ACalbazana@epotec.com>
Date: Thu, 11 Jul 2002 14:54:00 -0400
Message-ID: <792864BE6F6FD41197CD00508B92D00AADEC28@EPOMAIL01>
To: "'www-forms@w3.org'" <www-forms@w3.org>


I am putting together a little XSLT to assist with the processing of XForm
UI markup to HTML.  I am stumbling on a namespace issue that I can not seem
to resolve.  Any XPath help here would be appreciated!


A sample xform doc looks like:


<?xml version='1.0'?>

<?xml-stylesheet type="text/xsl" href="./xforms.xsl"?>


<form name="myform">

            <selectOne xmlns:xforms='http://www.w3.org/2002/01/xforms'
class='' ref='10' selectUI='listbox'>

<caption>Which statement best describes your dieting history?</caption>








A sample xsl looks like:


<?xml version="1.0"?>

<xsl:stylesheet version="1.0" 




            <xsl:template match="/form">








            <xsl:template match="xforms:selectOne">

                        <xsl:apply-templates select="xforms:caption"/>






            <xsl:template match="xforms:caption">

                        <xsl:value-of select="."/>



            <xsl:template match="*|@*|node()"/>



Why don't xforms:caption or xforms:selectOne match?  The namespaces are
correct, but the template match fails...


I had another document that used a prefix in front of every element (e.g. -
<xforms:selectOne/>).  This seemed to work nicely w/ XPath, but the document
was rather bloated... 





This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

Received on Thursday, 11 July 2002 14:55:09 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:36:06 UTC