But basically if I try to extract an XML Node value from some XML that
contains a CDATA tag using XPath, then the variable assignment returns
the XML header and the whole Node XML I was querying. If the exact
same query is done without the CDATA tags in the Node, the Node's
value is returned only.
e.g.
<?xml version="1.0" encoding="UTF-8"?>
<Locales>
<Locale lang="cdata" default="true">
<PDFEmail>
<EmailBody><![CDATA[This is some text]]></EmailBody>
</PDFEmail>
</Locale>
<Locale lang="nocdata">
<PDFEmail>
<EmailBody>This is some text</EmailBody>
</PDFEmail>
</Locale>
</Locales>
/process_data/xmlData/Locales/Locale[@lang='cdata']/PDFEmail/
EmailBody
Returns: <?xml version="1.0" encoding="UTF-8"?><EmailBody><!
[CDATA[This is some text]]></EmailBody>
/process_data/xmlData/Locales/Locale[@lang='nocdata']/PDFEmail/
EmailBody
Returns: This is some text
Duane
Überity.com Principle Data Architect
Adobe LiveCycle ES Consultant
http://technoracle.blogspot.com
@duanechaos
>--
>You received this message because you are subscribed to the Google Groups
>"Adobe LiveCycle Developers" group.
>To post to this group, send email to live...@googlegroups.com.
>To unsubscribe from this group, send email to
>livecycle+...@googlegroups.com.
>For more options, visit this group at
>http://groups.google.com/group/livecycle?hl=en.
>
It isn't a form, its just a process. The data from the XML is being
extracted based on a locale then injected into an email later down the
process.
It is using Workbench 10 on ADEP. I have the email to enterprise
support all ready to go but wanted to know if this is expected
behavior first.
Darren
On Dec 2, 5:05 am, Duane Nickull <du...@uberity.com> wrote:
> What version of LC are you using before I take a look at the *.lca? Can
> you just send the form?
>
> Duane
> Überity.com Principle Data Architect
> Adobe LiveCycle ES Consultanthttp://technoracle.blogspot.com
> @duanechaos
-matt
Adobe Support should be contacted.
________________________________________
Überity.com
Principal Data Architect
http://www.uberity.com
Blog | http://technoracle.blogspot.com
Twitter | @duanechaos
On Dec 2, 8:27 am, Duane Nickull <du...@uberity.com> wrote:
> +1
>
> Adobe Support should be contacted.
> ________________________________________
>
> Überity.com
> Principal Data Architecthttp://www.uberity.com
> Blog |http://technoracle.blogspot.com
> Twitter | @duanechaos
>
The enhancement request # is 2787708.
I was not very pleased with that response - how can you say you
support XML without supporting CDATA sections? - but I figured out a
workaround and had other fish to fry so I let it drop.
If you need to reference my original case with Adobe support, it was
case #181918090. I was unhappy with the response, so I requested a
Bug Request Review (case #182119634) which came back with the same
response.
I wish you better luck than I had.
Regards,
Rob
Rob McDougall | Senior Technical Architect | 4Point | www.4Point.com
On 11-12-02 7:50 AM, "RobMcD" <rmcd...@gmail.com> wrote:
>
>I was not very pleased with that response - how can you say you
>support XML without supporting CDATA sections? - but I figured out a
>workaround and had other fish to fry so I let it drop.
Is you cannot. The W3C XML Specification is very terse WRT the rules of
parsing. CDATA is to be treated very differently than PCDATA. In either
case, the path does not correspond to the fragment returned.
Does anyone know which library they use for xPath/XSLT? Was it
Xerces.jar?
Duane
Its supposed to support DOM Level 2 version 1.0 (http://www.w3.org/TR/
DOM-Level-2-Core/core.html#ID-667469212)
Same as Rob I have created a workaround which is to basically HTML
Encode any HTML Email content I wanted in the XML. Pretty clunky but
it works and there are plenty of HTML Encoders on the web.
I still have an open ticket so I will let you know how it goes.
Darren
On Dec 3, 3:36 am, Duane Nickull <duane.nick...@gmail.com> wrote:
> The answer to this:
>
Yes, that was my position as well, however that was the answer I got
back and there was no movement on it. Clearly someone in the process
didn't understand XML well enough to understand why this is a bug.
>> Does anyone know which library they use for xPath/XSLT? Was it
>> Xerces.jar?
>>
> Its Xerces according to this: http://www.adobe.com/devnet/livecycle/articles/building-xml.html
> Its supposed to support DOM Level 2 version 1.0 (http://www.w3.org/TR/
> DOM-Level-2-Core/core.html#ID-667469212)
Ahh, now we hit the subtle part. Duane asks the right question, but
then suggests the wrong answer. Xerces is an XML parser and doesn't
have an inherent XPath implementation. Xalan is Apache's XPath
implementation.
My recollection (from my investigation) is that the problem is not in
the way that the XML is parsed, but rather it's an XPath
implementation issue. The DOM code rightly treats the CDATA section
as a separate node however, the XPath spec indicates that XPath
expressions should ignore the CDATA nodes and only pay attention to
the content within. That's where I believe the problem is. Their
XPath implementation is not bypassing the CDATA node to look at the
content inside that CDATA section. It's making the CDATA node visible
when it shouldn't.
I don't know for sure, but I'm assuming that they rolled their own
XPath implementation. Certainly, there are a lot less functions
available than in any of the standard implementations I'm familiar
with. That's where I think the problem lies.
Correct. My mistake. I could never figure out how come everyone wanted
their XML libs to start with an "X". Found it confusing. It was a
relatively popular activity in the late 1990s and early 2000s.
Your hypothesis sounds solid. To fully test it perhaps he could use
something like JDOM to run tests against the in-memory DOM could validate
that the problem is not in the parsing and DOM building but rather the
Xpath implementation. JDOM has simple methods to detach and return
various parts of the DOM.
What makes me wonder though is that Xalan.jar is included in the LC SDK if
memory serves me correctly. I am not sure if it is used in the core also
but it would be really bad architecture IMO to mix two different Xpath
implementations. Did Adobe actually confirm they did this? Not saying
they wouldn't, just find it surprising they would.
Duane
________________________________________
Überity.com
Principal Data Architect &
Adobe LiveCycle ES Consultant Services
http://www.uberity.com
Blog | http://technoracle.blogspot.com
Twitter | @duanechaos
;-)
________________________________________
Überity.com
Principal Data Architect &
Adobe LiveCycle ES Consultant Services
http://www.uberity.com
Blog | http://technoracle.blogspot.com
Twitter | @duanechaos
You wouldn't believe some of the stuff I regularly get back from escalations of Adobe Enterprise support for Connect... Adobe's Enterprise support's responses more often than not are of rather low/useless quality :-(
Kai
Sadly, I believe it. That is why we set up this community list in the
first place. I am not sure what will happen given a lot of the people who
formerly helped the community are no longer working for Adobe.
If anyone is really stuck, Uberity (my new company) employs some former
rock star LiveCycle engineers and developers who were recently liberated
during the layoffs. They are the cream of the crop and can offer services
for hire related LC ES. We are working on a few different projects and
can do anything from installs to multi week projects involving multiple
products (LC ES with custom mobile development).
We're here and open for business.
Duane
________________________________________
Überity.com
Principal Data Architect &
Adobe LiveCycle ES Consultant Services
http://www.uberity.com
Blog | http://technoracle.blogspot.com
Twitter | @duanechaos
I am truly sorry to hear this. I spent 8 years of my life building the
LiveCycle brand and building a reputation for fast and quick help via this
list and fellow community members. I hope the escalations work.
Duane
________________________________________
Überity.com
Principal Data Architect &
Adobe LiveCycle ES Consultant Services
http://www.uberity.com
Blog | http://technoracle.blogspot.com
Twitter | @duanechaos
Adobe enterprise support used to be fairly good but there were times when
this forum was a better place to get fast response. This is not a bad
thing; peer to peer support is good for any product. I would never speak
negatively about Adobe but I do not agree with their latest business
decisions. Building trust in the enterprise is a tricky business and I
believe we did well from 2003 - 2011. There was always room for
improvement. For me, I have had to scale back on answering questions on
this forum about LC as it is no longer my job. Adobe made a conscious
decision to lay off people like me who helped you but in all fairness,
they believe they are making a good business move. I have never run a $4
billion/year company so who am I to argue.
Even today, they announced 224 layoffs.
http://www.mercurynews.com/business/ci_19706210
They have stated they are going to focus on marketing
http://www.itjoblog.co.uk/blogadmin/mt-search.cgi?IncludeBlogs=1&search=Goo
gle%20Apps
http://www.peterelst.com/blog/2011/12/28/the-year-that-was-2011/
My own take is here:
http://technoracle.blogspot.com/2011/11/goodbye-adobe-we-had-fun.html
I had an excellent boss (ben Forta) and got to work with some great
people. Like all good things though, it comes to an end sometime. This
is an opportunity for me and Uberity is now a top firm employing some of
the smartest former Adobe LiveCycle Engineers. We have staked part of our
business model on LC work and this is something that we owe Adobe a lot
for (training us, building our public profiles etc.). You also have great
companies like Avoka who stuck with LC ES through thick and thin to serve
customers and developers.
I don't believe anything malicious was planned by the re-focus.
So where does this leave us? Customers first need to go through proper
channels to get help (adobe support). As a second tier, there is an
enterprise evangelism team that is staffed with very talented people like
Michael Chaize. As a last resort, you may have to contract for support
with third parties and ask for help here on this forum. I am not sure
what the long term commitment is to solve bugs is and perhaps someone who
can speak for Adobe can chime in here.
4Points, Avoka, Uberity, Synergy, Skunkwerks, Ensemble et al are here to
help you. We all can help with minor issues on this list (free advice)
and also offer paid enterprise class support if required. The only thing
we cannot do is to fix bugs. Together, we can focus our request though to
help Adobe understand the critical issues. We can also work together to
find and share workarounds. This is good for all of us.
Let's keep this forum alive to keep Adobe honest and help them help us.
It is a win-win for all.
My $0.02 worth.
Duane
________________________________________
Überity.com
Principal Data Architect &
Adobe LiveCycle ES Consultant Services
http://www.uberity.com
Blog | http://technoracle.blogspot.com
Twitter | @duanechaos
To answer your question, it might be a better option to ask someone from
Adobe to clarify things. My concern is the future of LiveCycle and from
what I read in the news, Adobe is moving away from it in the long term. I
do not speak for them.
Ref: "Adobe will cut 750 jobs and reduce its investment in enterprise
software" -
http://www.pcworld.com/businesscenter/article/243428/adobe_to_reduce_enterp
rise_software_investment.html
What does this mean? Again, I don't speak for Adobe but if I had to defend
a decision to use LC as opposed to something that another vendor is
committed to grow, LC better have some value proposition to rationalize
it. I've never run a $4billion/year company and had to make hard
decisions so I cannot be judgemental nor will I speak badly of Adobe. I
loved working there and loved my job.
Perhaps someone from Adobe can speak to this forum and let us know what
the plans are? I have not seen anything official for a while.
Duane
________________________________________
Überity.com
Principal Data Architect &
Adobe LiveCycle ES Consultant Services
http://www.uberity.com
Blog | http://technoracle.blogspot.com
Twitter | @duanechaos
If *I* were an Adobe customer, and I received the message below, I would certainly reference the XML standard, and if the support team I was contacting brushed me off I would use that information wisely. Use your imagination.
Adobe's support folks are good people. They may not all have good training on the product, however. Don't be afraid to escalate the escalation. Talk to your CEO, he knows what to do. If you are a customer, you have rights, and in Adobe's case I know that if an issue actually gets raised through the support system to engg, it WILL get solved. Support doesn't always escalate to Engg, and in some cases that is bad.
-matt
I don't get the warm and fuzzies when the guy that should know doesn't
know the procedures he is suppose to be following. I can live,
unhappily, with the tech guy not knowing the specific problem/product as
everyone can't know everything. But I do question that person not
knowing their companies (or the company that hires the company that
hires him) procedures such as a problem tracking system.
Duane
________________________________________
Überity.com
Principal Data Architect &
Adobe LiveCycle ES Consultant Services
http://www.uberity.com
Blog | http://technoracle.blogspot.com
Twitter | @duanechaos
>>marketinghttp://www.itjoblog.co.uk/blogadmin/mt-search.cgi?IncludeBlogs=1
>>&sear...
>> >
>>gle%20Appshttp://www.peterelst.com/blog/2011/12/28/the-year-that-was-2011
>>/
>>
LiveCycle presents a fantastic feature set for many use cases, and will continue to be a logical choice for the foreseeable future.
--
Matt
I have lots of other things I could be doing :-)
-matt
;-p
:-)
substring-before(substring-after(serialize(xpath_to_cdata_node, false), "CDATA["), "]]")
Yes, it's ugly but it get's the job done without additional steps in the process.
Cheers,
WP
Hi guys - am having a weird issue with CDATA in XML and cant work out
if it is a bug (sorry - Feature) of Workbench or if it is expected
behavior. It easier to demonstrate in a simple LCA:
http://dl.dropbox.com/u/7636567/CDATABug_1-0_2011-12-01-1346.lca (just
import and run CDATABug process)But basically if I try to extract an XML Node value from some XML that
contains a CDATA tag using XPath, then the variable assignment returns
the XML header and the whole Node XML I was querying. If the exact
same query is done without the CDATA tags in the Node, the Node's
value is returned only.e.g.
<?xml version="1.0" encoding="UTF-8"?>
<Locales>
<Locale lang="cdata" default="true">
<PDFEmail>
<EmailBody><![CDATA[This is some text]]></EmailBody>
</PDFEmail>
</Locale>
<Locale lang="nocdata">
<PDFEmail>
<EmailBody>This is some text</EmailBody>
</PDFEmail>
</Locale>
</Locales>/process_data/xmlData/Locales/Locale[@lang='cdata']/PDFEmail/
EmailBodyReturns: <?xml version="1.0" encoding="UTF-8"?><EmailBody><!
[CDATA[This is some text]]></EmailBody>/process_data/xmlData/Locales/Locale[@lang='nocdata']/PDFEmail/
EmailBodyReturns: This is some text
Hi guys,
Just found out there is an another, easier, way. A post on stackoverflow got me on to this: simply use the XSLT component in a process to 'convert' the incoming xml to the same xml. This will automagically convert all CDATA tags to encoded text tags which of course can than accessed used xpath without any problems.
I used the exact xslt given in the answer in the XSLT component and it works like a charm.
Here's the direct link to the answer on stackoverflow: http://stackoverflow.com/a/10543572
Cheers
WP