XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Jon GallegosSubject: element type must not contain the '<' character
Author: Jon Gallegos
Date: 10 Jun 2008 04:28 PM
I am getting the following error which I knew I would get when I saw the input file for my xslt which I have attached.

Error on line 78 column 19 of file:/nas02/ECRF/scripts/PDH.xml:
SXXP0003: Error reported by XML parser: The value of attribute "value" associated with an
element type "UserValue" must not contain the '<' character.
Transformation failed: Run-time errors were reported


I have talked with the user and they said "too bad deal with it" so now i am asking you, how can I deal with this?


Documentecrf_export1.xml

Postnext
Ivan PedruzziSubject: element type must not contain the '<' character
Author: Ivan Pedruzzi
Date: 10 Jun 2008 05:24 PM

Jon

This is not a valid XML document and none of the tools that are designed to process XML will be able to understanding it.

The error is to not escape the attribute values, the XML should look like that

<UserValue value="&lt;Attachment only&gt;" title="H_cmdesceng" />

Who is generating this file?
Do you have any control on the process?

Hope this helps
Ivan Pedruzzi
Stylus Studio Team

Posttop
Tony LavinioSubject: element type must not contain the '<' character
Author: Tony Lavinio
Date: 10 Jun 2008 11:24 PM
You need to reply to them and tell them "no, it must be fixed."
It is not XML.
All XML parsers are *required* to reject it.
This is actually in the spec several times. I counted four, but the
most telling is this one:

http://www.w3.org/TR/2006/REC-xml-20060816/#CleanAttrVals
Well-formedness constraint: No < in Attribute Values
The replacement text of any entity referred to directly or indirectly in an attribute value MUST NOT contain a <.

Since that is a WFC (well-formedness constraint), it means ALL XML
parsers will consider it invalid. And the parsers are not going to
change for their application.

The reason for this is it is an extra guard against certain classes
of syntax errors. Without this, they can be much harder for the
parser to locate and report to the user.

 
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.