Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / January 2007

Tip: Looking for answers? Try searching our database.

Help! .NET access to InfoPath functions (FormatString)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Shaul Dar - 25 Jan 2007 08:08 GMT
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:otherwise>
   <xsl:value-of select="&quot;1961-09-18T03:00:00&quot;"/>
 </xsl:otherwise>
/xsl:choose>
Jose - 26 Jan 2007 16:48 GMT
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.

> I am using InfoPath 2003 to create a read-only view (really a report,nota 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
[quoted text clipped - 31 lines]
>   </xsl:otherwise>
> /xsl:choose>
Shaul Dar - 29 Jan 2007 14:39 GMT
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 כתב:
> Hi,
>
[quoted text clipped - 41 lines]
> >   </xsl:otherwise>
> > /xsl:choose>
S.Y.M. Wong-A-Ton - 31 Jan 2007 06:15 GMT
There is no extensions library that I know of.

Another suggestion would be to create your own XSL file and do the
conversion to HTML or Word like in this article:
http://enterprise-solutions.swits.net/infopath2003/article.php?t=convert-infopat
h-form-into-word-doc-send-email-attachment-outlook&c=infopath2003


This problem does not go away in InfoPath 2007.
---
S.Y.M. Wong-A-Ton

> 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
[quoted text clipped - 33 lines]
>   </xsl:otherwise>
> /xsl:choose>
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.