.NET Framework - Working with XML elements containing curly braces in the data

Asked By Richi Nguyen on 25-Jan-07 12:27 PM
Hi,

I am not able to work with XML elements containing curly braces in the
data such as
simple <xsl:value-of select="RuleGroupID" /> will fail to produce any
output.  Does anyone have any insight on what I may be doing wrong?

Thanks,
Richi




Martin Honnen replied on 25-Jan-07 01:37 PM
I can't tell from that snippet what the problem is but I am pretty sure
the element content containing curly braces does not matter to XPath or
XSLT.
So <xsl:value-of select="RuleGroupID" /> not producing any output can
have various reasons, default namespace the problem which most people
run into.
Show us some context, then we can solve that I hope.

--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Neil Smith [MVP Digital Media] replied on 25-Jan-07 02:17 PM
On 25 Jan 2007 09:27:55 -0800, "Richi Nguyen" <richi.nguyen@gmail.com>



Well it may look like an "attribute value template" to the processor
(but shouldn't). What happens if you wrap he rulegroup in xsl:text,



The more likely explanation though is that your complete XSL file
doesn't have a match pattern for that element at all, or it's not a
child of the node you *think* you're processing. Only posting a
complete but minimal example of the XML and XSLT would help with
working that out.

HTH
Cheers - Neil
------------------------------------------------
Digital Media MVP : 2004-2007
http://mvp.support.microsoft.com/mvpfaqs
Richi replied on 26-Jan-07 01:31 AM
Thanks for the replies.  <xsl:text><xsl:value-of select="RuleGroupID"
/></xsl:text>  did not work.  Here are minimal examples of the XML and
XSLT:


{ED714DA6-F638-4A8A-879D-79EF2AC1D499}
HP ProLiant Servers

xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-


- Richi
Magnus Henriksson replied on 26-Jan-07 03:02 AM
^^^

There are no Row elements in the example source...


// Magnus
Peter Flynn replied on 27-Jan-07 11:30 AM
You're using broken software. Curly braces are valid character data, so
a conformant processor will just treat them as such and will not try to
interpret them. Switch to an XSLT processor that works.

///Peter
--
XML FAQ: http://xml.silmaril.ie
Richi replied on 29-Jan-07 08:39 PM
Thanks for everyone's help.  I was using the Silect MP Studio
application's processor to intrepret the XSLT.  Using a conformant
processor resolved the issue.

Richi