Help! .NET access to InfoPath functions (FormatString)

S

Shaul Dar

I am using InfoPath 2003 to create a read-only view (really a report,
not a form). I then extract the view (.xsl) file from the .xsn file and
use it outside InfoPath to create an HTML display from an XML data
file. The latter part is done with .NET's parser. My problem is that
some formatting functionality available is InfoPath, specifically the
formatString function, is not available outside it. See e.g. XSL
snippet on bottom.

This functionality ("xdFormatting")is apparently defined in the name
space
xmlns:xdFormatting="http://schemas.microsoft.com/office/infopath/2003/xslt/formatting".
My question is if there is some InfoPath extenstions library then I
need to get and use to have access to this functionality? Other
suggestions? Does this problem go away in InfoPath 2007? (since they
have "browser-compatible" templates that can be displayed in IE w/o
InfoPath client)?

Thanks!

-- Shaul

-----------------------------

This XSL snippet uses "xdFormatting:formatString", if available, to
present a date/time value in some format. If the function is not
available it presents the date/time as is (as in the XML):

<xsl:choose>
<xsl:when test="function-available('xdFormatting:formatString')">
<xsl:value-of
select="xdFormatting:formatString(&quot;1961-09-18T03:00:00&quot;,&quot;datetime&quot;,&quot;locale:1033;dateFormat:dddd,
MMMM dd, yyyy;timeFormat:hh:mm:ss tt;&quot;)"/>
</xsl:when>
<xsl:eek:therwise>
<xsl:value-of select="&quot;1961-09-18T03:00:00&quot;"/>
</xsl:eek:therwise>
/xsl:choose>
 
J

Jose

Hi,

i have the exact same "problem" after performing a transformation in
c#...
after intense googling i reached no solution...
Would you let me know if you find some sort of workaround?

thanks,
js.
 
S

Shaul Dar

Jose,

I suspect there is no solution. At least my searches and posts have
not yielded any positive info. See http://www.infopathdev.com/forums/
topic.asp?TOPIC_ID=4243 for a reply aparently from a MS InfoPath
developer that also indicates no solution.

Perhaps in InfoPath 2007 there is a solution, I have't tried it yet.
But it is also possible that if I designate a template as "browser
compatible" InfoPath 2007 will block somehow the features that are not
pure XSL

Good luck,

-- Shaul

Jose כתב:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top