Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Can't find xdXDocument:GetDOM when parsing view XSLT

0 views
Skip to first unread message

Nick Head

unread,
Feb 7, 2005, 6:41:03 PM2/7/05
to
I have an applicaiton that renders forms into XHTML outside of Infopath e.g.
the user fills out the forms in IP then they are saved and rendered for the
web. Users have now started using some more advanced functionality including
the conditional formatting. They check to see if a data field matches a
particular custom pattern and if not, doesn't display it on the view.

The problem comes about when I transform the form XML against the downlevel
XSLT using MSXML 4.0.

The relevant XSLT is:

<xsl:if test="function-available('xdXDocument:GetDOM')">
<xsl:attribute name="style">
<xsl:choose>
<xsl:when test="not(xdUtil:Match(string(my:proportion),
".*\d.*"))">DISPLAY: none</xsl:when>
</xsl:choose>
</xsl:attribute>
<xsl:value-of select="../my:unit"/>
</xsl:if>

I did a test and it seems that function-available('xdXDocument:GetDOM')
always returns false. How do I ensure that this stylesheet with the Match()
function is going to be available when I transform this form?

Thanks
Nick

Brian Teutsch [MSFT]

unread,
Feb 7, 2005, 8:58:28 PM2/7/05
to
That function is not going to be available when the stylesheet is not being
rendered in InfoPath.

InfoPath stylesheets are written to be as useful as possible outside of
InfoPath, but some types of conditional formatting require functions not
available in standards XSL. The RegEx matching in your conditional
formatting is one of those functions. xdXDocument:GetDOM is sometimes used
as a test to skip blocks of XSL that will not function outside of InfoPath.

The XML can obviously still be shown in a web page, but you'll be unable to
use the advanced XSL formatting InfoPath makes available.

Brian

"Nick Head" <Nick...@discussions.microsoft.com> wrote in message
news:71F40EA1-5D4A-4344...@microsoft.com...

Nick Head

unread,
Feb 7, 2005, 11:03:02 PM2/7/05
to
I was fearing that might be the case.

So is there anyway I can fake it by providing my own implementation of the
Match() function on a manually supplied stylesheet? Or alternatively, is
there some other way I can still provide condiitonal formatting for my users?

Thanks
Nick

Brian Teutsch [MSFT]

unread,
Feb 8, 2005, 12:19:17 AM2/8/05
to
For your particular case, you'll have to write up your own XSL processor
object with a match function. It's not impossible, and you can even do it in
JScript.

Not all conditional formatting requires your own processor object. You just
happened to use one of the options that isn't supported by a standard XSL
test function.

Brian

"Nick Head" <Nick...@discussions.microsoft.com> wrote in message

news:1C19B4AC-9C53-4F22...@microsoft.com...

0 new messages