XML entities in xs:base64Binary
Hi there,
this is my first Post, and i hope i am at the right place in this forum.
I am integrating a third party application, that provides WSDL files for generating web services. An internal Web Service is creating an XML which is than encoded via base64 an sent as a SOAP message to the application.
So the SOAP message contains an element (type xsd:base64Binary) in wich the base64 content is transported. The problem is, that in this base64 string, there are xml entities 
 instead of the allowed base64 whitespace characters.
Can anyone give me a hint, if these character entities can be supressed?
Best
Thomas
Hi,
Sorry, but i think i cant do search and replace here.
@David: the SOAP message containing the base64Binary element is sent from SAP to the application. It is created by a consumer proxy we generated from the WSDL files provided by the third party application (namely StreamServe) . The application cant handle the character entities 
 the base64 string contains.
We also regenerated the proxy class, but there ist still a mapping from the xml schema type xsd:base64Binary to ABAP RAWSTRING.
This error (or these character entities) occur, since we upgraded to EHP1, so i think there might be the cause for this behaviour.
Best
Thomas
Similar Messages
-
UTF-8 conversion to XML entities
I'm looking for a function/method for converting UTF-8 encoded text into XML entities (like & etc.) anyone that can help?
/Nielshi nilesh,
UTF 8 does not recognise those special characters. You will have to change the encoding to <b>ISO-8859-1</b>.
For into on how to do this, check this thread,
Java Mapping Parsing Error
Regards,
Bhavesh -
Encoding Individual Strings with XML entities to replace "&", " ", etc.
We use templates to create XML files. The tags are in the templates and just the values get substituted in. Sometimes the variable value contains an ampersand or other XML-banned character.
1) Is there a simple method in the Java or Xerces class libraries that takes a string and returns one with the suspect characters replaced by XML entities?
2) Sometimes, though rarely (I have no control over this!) the variables arrive with the forbidden characters already replaced by entities. Is there a method which will tell me if the string already contains entities, or at least is already a valid XML string? Otherwise I'm afraid the ampersand in an already-converted entity name will itself be converted to another entity.
Thanks!I'm not aware of any built-in mechanism for doing that kind of escaping short of a full XML generator. Here's a lightweight solution that replaces ampersands only if they're not part of an XML entity. Just grab a copy of Elliott Hughes' Rewriter and implement it like this: public class Test
/* Rewriter can be found here:
* http://elliotth.blogspot.com/2004/07/java-implementation-of-rubys-gsub.html
public static void main(String... args) throws Exception
Rewriter xmlEscaper = new Rewriter("[<>'\"]|&(?!(?:lt|gt|apos|quot|amp);)")
public String replacement()
char ch = group(0).charAt(0);
switch (ch)
case '<' : return "&lt;";
case '>' : return "&gt;";
case '\'' : return "&apos;";
case '"' : return "&quot;";
case '&' : return "&amp;";
default :
throw new IllegalStateException("this can't happen");
String str = "this & that & the <other&gt;";
System.out.println(xmlEscaper.rewrite(str));
} -
Resolving xml entities only in a string
Hi!
Is there any function in any API that can resolve XML entities like & to &, > to > and so on that can handle the input as a string?
/TecIf you mean, is there any Java method to convert "<" to < and so on, no, there isn't. However if you use standard XML parsers then you don't have to worry about that issue because they take care of it for you. If you're writing your own parser then you have to write the unescaping code yourself.
-
Escape XML entities when transforming
Hey,
I'm transforming an XML file to another XML format. My problem is that in the original XML there are entities like "©". These entities get transformed as well which produces problems later on. Is there some way to avoid the entities from being expanded? I have tried to google for an answer without success. The only thing I found was the "setExpandEntityReferences" which doesn't have any effect. Otherwise the transformation works fine, just having problems with the entities.
Thanks for any help!Generally the parser will expand those entities, so the transformer doesn't even know there were any entities in the document. What you're asking for is for the serializer to put entity references back into the output document. (And preferably for the transformer to preserve them through the transformation, too, I suppose.)
I don't believe there is anything in XSLT that deals with entities at all... actually, looking at the XSLT recommendation there is an unparsed-entity-uri(string) function, but you're asking about parsed entities from the DTD, right?
In theory the version of the document with the entities replaced by their replacement text should be equivalent to the version with the entity references, no? Is there just an esthetic difference or is there an actual difference in meaning between what you get and what you want to get? -
XML entities not properly displaying
I have an XML doc with apostrophies and such and have changed
them to the proper entity (') however, regardless of
whether or not I change them they are always displayed as
"'" ...anyone know why? When I publish my flash file my
XML text is displayed as such:
"The cat's hat fell off."
Thanks!
EwonHi,
this is probably because there's only one "end of line" character (probably after <?xml ... ?>). This is normal, but you must store the second line in a string data object, which will then receive the whole XML stream (except the xml header as it is stored in the first line). And that's done.
BR
Sandra -
Fetch repository xml-entities from workflow instances
Can you help me with a piece of Java code illustrating access of repositoty from
within the BPM ?When you transform your XMLdata to a xmltype you can do something like this for example:
select
extractvalue(value(p),'/XMLRecord/Session_Id') session_id,
extractvalue(value(p),'/XMLRecord/StatementId') StatementId,
extractvalue(value(p),'/XMLRecord/EntryId') EntryId
from
table(xmlsequence(extract(xmltype('
<XMLdemo>
<FormatModifiers><FormatModifier>UTFEncoding</FormatModifier></FormatModifiers>
<XMLRecord>
<Session_Id>117715</Session_Id>
<StatementId>6</StatementId>
<EntryId>1</EntryId>
</XMLRecord>
</XMLdemo>
'),'/XMLdemo/*'))) p
where extractvalue(value(p),'/XMLRecord/Session_Id') is not null;
For this sample I've put a readable XML in plain text and convert it to xmltype so you can run it on your own database. -
Defining entities with XML schema
Hi,
I came across a problem with XML schema's apparent lack of support for entities. e.g. we define an entity like this:
<!ENTITY le "≤" >.
First off I was trying in my XML instance to include an external entity file like this:
<!DOCTYPE wpi [
<!ENTITY % DerwentXmlEntities PUBLIC "-//Derwent//Derwent XML General ENTITIES 20000214//EN"
"derwent-xml-entities.ent">
%DerwentXmlEntities;
]>
<WPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.derwent.co.uk/wpi.xsd">
but I am not clear on where I should place the file derwent-xml-entities.ent. Everything I tried ended up with:
ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00202: could not open file "derwent-xml-entities.ent"
Is it possible to include a file like this?
So I tried just defining an entity like this:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE wpi [
<!ENTITY times "×">
<!ENTITY le "≤">
]>
The "times" seems OK, but for "le" I get:
ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00217: invalid character 8804 (\u2264)
What sort of encoding should I use?
Thanks
Pete<xsd:element name="PsL">
<xsd:annotation>
<xsd:documentation>
**Pseudo List, required as in D-types, the editors often used the
{H control sequence to force an indent to make lists of compounds more
legible. We can't be sure that they are always lists but there is
useful mark-up there that we wouldn't want to lose**
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="PsE" minOccurs="1" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="PsE">
<xsd:annotation>
<xsd:documentation>
Pseudo List Entry
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence minOccurs="1" maxOccurs="1">
<xsd:element ref="PsP" minOccurs="1" maxOccurs="1"/>
<xsd:element ref="PsS" minOccurs="1" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="PsP">
<xsd:annotation>
<xsd:documentation>
Pseudo List Prefix
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="PsP" type="xsd:string"/>
<xsd:element ref="Sub" minOccurs="1" maxOccurs="1"/>
<xsd:element ref="Sup" minOccurs="1" maxOccurs="1"/>
<xsd:element ref="Em" minOccurs="1" maxOccurs="1"/>
</xsd:choice>
</xsd:complexType>
</xsd:element>
<xsd:element name="PsS">
<xsd:annotation>
<xsd:documentation>
Pseudo List Suffix
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="PsS" type="xsd:string"/>
<xsd:element ref="Sub" minOccurs="1" maxOccurs="1"/>
<xsd:element ref="Sup" minOccurs="1" maxOccurs="1"/>
<xsd:element ref="Em" minOccurs="1" maxOccurs="1"/>
</xsd:choice>
</xsd:complexType>
</xsd:element>
<xsd:element name="Prt">
<xsd:annotation>
<xsd:documentation>
************************ Part Container Element **************
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence minOccurs="1" maxOccurs="1">
<xsd:element ref="PrtNo" minOccurs="1" maxOccurs="1"/>
<xsd:element ref="PrtNm" minOccurs="1" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="PrtNo">
<xsd:annotation>
<xsd:documentation>
PartNo
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="PrtNo" type="xsd:string"/>
<xsd:element ref="Sub" minOccurs="1" maxOccurs="1"/>
<xsd:element ref="Sup" minOccurs="1" maxOccurs="1"/>
<xsd:element ref="Em" minOccurs="1" maxOccurs="1"/>
</xsd:choice>
</xsd:complexType>
</xsd:element>
xsd:element name="PrtNm">
<xsd:annotation>
<xsd:documentation>
PartName
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="PrtNm" type="xsd:string"/>
<xsd:element ref="Sub" minOccurs="1" maxOccurs="1"/>
<xsd:element ref="Sup" minOccurs="1" maxOccurs="1"/>
<xsd:element ref="Em" minOccurs="1" maxOccurs="1"/>
</xsd:choice>
</xsd:complexType>
</xsd:element>
<xsd:element name="L">
<xsd:annotation>
<xsd:documentation>
************************ List Container Element *************
Attribute typ=used by the composition software to decide how to prefix
the list entries, e.g. (a), (A), (i), (1), etc.
AL for AlphaLower
AU for AlphaUpper
RL for RomanLower
RU for RomanUpper
No for Number
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence minOccurs="1" maxOccurs="unbounded">
<xsd:element ref="LP" minOccurs="1" maxOccurs="1"/>
<xsd:element ref="LS" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
<xsd:attribute name="typ" use="optional">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="AL"/>
<xsd:enumeration value="AU"/>
<xsd:enumeration value="RL"/>
<xsd:enumeration value="RU"/>
<xsd:enumeration value="No"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:complexType>
</xsd:element>
<xsd:element name="LP">
<xsd:annotation>
<xsd:documentation>
List Paragraph
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="LP" type="xsd:string"/>
<xsd:element ref="Sub" minOccurs="1" maxOccurs="1"/>
<xsd:element ref="Sup" minOccurs="1" maxOccurs="1"/>
<xsd:element ref="Em" minOccurs="1" maxOccurs="1"/>
<xsd:element ref="RefD" minOccurs="1" maxOccurs="1"/>
<xsd:element ref="RefF" minOccurs="1" maxOccurs="1"/>
</xsd:choice>
</xsd:complexType>
</xsd:element>
<xsd:element name="LS">
<xsd:annotation>
<xsd:documentation>
1st level sublist
Attribute typ=used by the composition software to decide how to prefix
the list entries, e.g. (a), (A), (i), (1), etc.
AL for AlphaLower
AU for AlphaUpper
RL for RomanLower
RU for RomanUpper
No for Number
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence minOccurs="1" maxOccurs="unbounded">
<xsd:element ref="LP" minOccurs="1" maxOccurs="1"/>
<xsd:element ref="LSS" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
<xsd:attribute name="typ" use="optional">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="AL"/>
<xsd:enumeration value="AU"/>
<xsd:enumeration value="RL"/>
<xsd:enumeration value="RU"/>
<xsd:enumeration value="No"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:complexType>
</xsd:element>
<xsd:element name="LSS">
<xsd:annotation>
<xsd:documentation>
2nd level list
Attribute typ=used by the composition software to decide how to prefix
the list entries, e.g. (a), (A), (i), (1), etc.
AL for AlphaLower
AU for AlphaUpper
RL for RomanLower
RU for RomanUpper
No for Number
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="LP" minOccurs="1" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="typ" use="optional">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="AL"/>
<xsd:enumeration value="AU"/>
<xsd:enumeration value="RL"/>
<xsd:enumeration value="RU"/>
<xsd:enumeration value="No"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:complexType>
</xsd:element>
<xsd:element name="IndexingCorePt">
<xsd:annotation>
<xsd:documentation>
******** ROOT ELEMENT for Core Patent Indexing *********
** Indexing is composed of Derwent Classification (DC),IPCs,
Fragmentation Coding (Frags), Polymer Indexing, Unlinked Registry numbers
and Keyword Indexing (KI).
Any combination is these three elements is allowed.
Attribute vs =Version number starting at 0
Attribute co =Patent country
Attribute se =Patent serial
Attribute ki =Patent Kind
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence minOccurs="1" maxOccurs="1">
<xsd:element ref="DC" minOccurs="0" maxOccurs="1"/>
<xsd:element ref="IPCs" minOccurs="0" maxOccurs="1"/>
<xsd:element ref="Frag" minOccurs="0" maxOccurs="1"/>
<xsd:element ref="Polymer" minOccurs="0" maxOccurs="1"/>
<xsd:element ref="IdxU" minOccurs="0" maxOccurs="1"/>
<xsd:element ref="KI" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
<xsd:attribute name="vs" type ="xsd:NMTOKEN" use="optional"/>
<xsd:attribute name="co" type ="xsd:NMTOKEN" use="required"/>
<xsd:attribute name="se" type ="xsd:NMTOKEN" use="required"/>
<xsd:attribute name="ki" type ="xsd:NMTOKEN" use="required"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="DC">
<xsd:annotation>
<xsd:documentation>
************* DERWENT CLASSIFICATION *******************
** Derwent Classification is divided in 3 main areas:
Chemical(CPI),General & Mechanical (EngPI),
Electronic & Electronical (EPI)
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:choice minOccurs="1" maxOccurs="1">
<xsd:sequence minOccurs="1" maxOccurs="1">
<xsd:element ref="CPIs" minOccurs="1" maxOccurs="1"/>
<xsd:element ref="EngPIs" minOccurs="0" maxOccurs="1"/>
<xsd:element ref="EPIs" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
<xsd:sequence minOccurs="1" maxOccurs="1">
<xsd:element ref="EngPIs" minOccurs="1" maxOccurs="1"/>
<xsd:element ref="EPIs" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
<xsd:element ref="EPIs" minOccurs="1" maxOccurs="1"/>
</xsd:choice>
</xsd:complexType>
</xsd:element>
<xsd:element name="CPIs">
<xsd:annotation>
<xsd:documentation>
UNIQUE ELEMENT DC
** Container element for CPI**
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="CPI" minOccurs="1" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="CPI">
<xsd:annotation>
<xsd:documentation>
UNIQUE ELEMENT CPIs
** CPI is composed of sections A to N (no section I)
Any combination is allowed, there has to be at least one section.
No section can appear twice. The DTD does not enforce this.
Section N can't be on his own. The DTD does not enforce this.
Each single Chemical section is composed of one main class (DCCM)
and zero to many secondary classes (DCCSs). One to many Manual
code (MCCs) has to be applied to a given chemical section.
Attribute section= an allowed Derwent CPI section **
Note that content MCCs is optional as its optional in the backfile
before 19??
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:choice minOccurs="1" maxOccurs="1">
<xsd:sequence minOccurs="1" maxOccurs="1">
<xsd:element ref="DCCM" minOccurs="1" maxOccurs="1"/>
<xsd:element ref="DCCSs" minOccurs="0" maxOccurs="1"/>
<xsd:element ref="MCCs" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
<xsd:element ref="MCCs" minOccurs="1" maxOccurs="1"/>
</xsd:choice>
<xsd:attribute name="sct" use="required">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="A"/>
<xsd:enumeration value="B"/>
<xsd:enumeration value="C"/>
<xsd:enumeration value="D"/>
<xsd:enumeration value="E"/>
<xsd:enumeration value="F"/>
<xsd:enumeration value="G"/>
<xsd:enumeration value="H"/>
<xsd:enumeration value="J"/>
<xsd:enumeration value="K"/>
<xsd:enumeration value="L"/>
<xsd:enumeration value="M"/>
<xsd:enumeration value="N"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:complexType>
</xsd:element>
<xsd:element name="DCCM" type="xsd:string">
<xsd:annotation>
<xsd:documentation>
** Derwent Class Chemical Main element **
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="DCCSs">
<xsd:annotation>
<xsd:documentation>
** Derwent Classes Chemical Secondary Container element**
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="DCCS" minOccurs="1" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="DCCS" type="xsd:string">
<xsd:annotation>
<xsd:documentation>
** A Derwent Class Chemical Secondary (DCCS) **
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="MCCs">
<xsd:annotation>
<xsd:documentation>
** Manual Codes CPI Container Element **
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="MCC" minOccurs="1" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="MCC" type="xsd:string">
<xsd:annotation>
<xsd:documentation>
** A Manual Code CPI **
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="EngPIs">
<xsd:annotation>
<xsd:documentation>
**General & Mechanical Sections Container element**
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="EngPI" minOccurs="1" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="EngPI">
<xsd:annotation>
<xsd:documentation>
UNIQUE ELEMENT EngPIs
** General & Mechanical Sections EngPI is composed of sections
P and Q. Any combination is allowed, with at least one section.
There are no manual codes for these sections.
Each single EngPI section is composed of
one or more Derwent Class Engineering (DCEng) elements.
No section can appear twice. The DTD does not enforce this.
Attribute section= an allowed Derwent EngPI section **
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="DCEngs" minOccurs="1" maxOccurs="1"/>
</xsd:sequence>
<xsd:attribute name="sct" use="required">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="P"/>
<xsd:enumeration value="Q"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:complexType>
</xsd:element>
<xsd:element name="DCEngs">
<xsd:annotation>
<xsd:documentation>
** Derwent Class Engineering Container eement **
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="DCEng" minOccurs="1" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="DCEng" type="xsd:string">
<xsd:annotation>
<xsd:documentation>
** Derwent Class Engineering **
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="EPIs">
<xsd:annotation>
<xsd:documentation>
** Electronic & Electrical Sections EPI **
Container element for EPI
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="EPI" minOccurs="1" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="EPI">
<xsd:annotation>
<xsd:documentation>
UNIQUE ELEMENT EPIs
** EPI is composed of sections R to X. Any combination is allowed,
with at least one section.
Section R can't be on his own. The DTD does not enforce this.
Each single is composed of one or more Derwent Class Electronic
and Electrical (DCE) elements.
No section can appear twice. The DTD does not enforce this. **
Attribute sct = an allowed Derwent EPI section
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="EPIgp" minOccurs="1" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="sct" use="required">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="R"/>
<xsd:enumeration value="S"/>
<xsd:enumeration value="T"/>
<xsd:enumeration value="U"/>
<xsd:enumeration value="V"/>
<xsd:enumeration value="W"/>
<xsd:enumeration value="X"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:complexType>
</xsd:element>
<xsd:element name="EPIgp">
<xsd:annotation>
<xsd:documentation>
** A Container element to group the related DCE & MCEs elements **
Note that content MCEs is optional as its optional in the backfile
before 19??
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence minOccurs="1" maxOccurs="1">
<xsd:element ref="DCE" minOccurs="1" maxOccurs="1"/>
<xsd:element ref="MCEs" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="DCE" type="xsd:string">
<xsd:annotation>
<xsd:documentation>
** Derwent Class Electronic & Electrical (DCE) contains
Manual Codes Electronic & Electrical (MCE) **
** Derwent Class EPI **
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="MCEs">
<xsd:annotation>
<xsd:documentation>
** Manual Codes EPI container element **
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="MCE" minOccurs="1" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="MCE" type="xsd:string">
<xsd:annotation>
<xsd:documentation>
** A Manual Code EPI **
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="IPCs">
<xsd:annotation>
<xsd:documentation>
********************IPCs Container element *************
** The following xlink construct is a link to the IPC codes on
the WIPO site, this could be added to the DTD to provide the link
without adding any thing to the individual instances
xlink:type (locator) #FIXED "locator"
xlink:rl NMTOKEN #FIXED "IPCs"
xlink:href CDATA #FIXED "http://classifications.wipo.int/fulltext/new_ipc/"
xlink:title CDATA #FIXED "IPC Codes" **
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="IPC" minOccurs="1" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="IPC">
<xsd:annotation>
<xsd:documentation>
UNIQUE ELEMENT IPCs
** An IPC Code **
** Attribute rnk= Derwent assigned character to indicate type
of IPC:
A= Main IPC
B= Other, unlinked IPCs
C to Y = Linked IPCs and Index Terms
Z= IPC Index Terms
-= Additional terms **
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="rnk" use="required">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="A"/>
<xsd:enumeration value="B"/>
<xsd:enumeration value="C"/>
<xsd:enumeration value="D"/>
<xsd:enumeration value="E"/>
<xsd:enumeration value="F"/>
<xsd:enumeration value="G"/>
<xsd:enumeration value="H"/>
<xsd:enumeration value="I"/>
<xsd:enumeration value="J"/>
<xsd:enumeration value="K"/>
<xsd:enumeration value="L"/>
<xsd:enumeration value="M"/>
<xsd:enumeration value="N"/>
<xsd:enumeration value="O"/>
<xsd:enumeration value="P"/>
<xsd:enumeration value="Q"/>
<xsd:enumeration value="R"/>
<xsd:enumeration value="S"/>
<xsd:enumeration value="T"/>
<xsd:enumeration value="U"/>
<xsd:enumeration value="V"/>
<xsd:enumeration value="W"/>
<xsd:enumeration value="X"/>
<xsd:enumeration value="Y"/>
<xsd:enumeration value="Z"/>
<xsd:enumeration value="-"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="Frag">
<xsd:annotation>
<xsd:documentation>
***************BCE INDEXING OR FRAGMENTATION ************
** Fragmentation Container element**
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="FragSub" minOccurs="1" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="FragSub">
<xsd:annotation>
<xsd:documentation>
UNIQUE ELEMENT Frag
** Fragmentation Sub heading **
** Attribute sjct=The main BCE chemical subject categories
defined by Derwent as subsets. The subsets are designated by the
subheadings MO through M6:
MO Agricultural, pharmaceutical 1963-1969
M1 Agricultural, pharmaceutical natural products
and polymers 1970 to present
M2 Agricultural, pharmaceutical 1970 to present
M3 General chemicals 1970 to present
M4 Dyes 1970 to present
M5 Steroids 1963 to present
M6 Galenicals 1976 to present"**
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="CardRec" minOccurs="1" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="sjct" use="required">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="M0"/>
<xsd:enumeration value="M1"/>
<xsd:enumeration value="M2"/>
<xsd:enumeration value="M3"/>
<xsd:enumeration value="M4"/>
<xsd:enumeration value="M5"/>
<xsd:enumeration value="M6"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:complexType>
</xsd:element>
<xsd:element name="CardRec">
<xsd:annotation>
<xsd:documentation>
** Card Record **
Attribute no =Derwent assigned record number
Attribute mc = Markush DARC Control Code
Attribute trc = Fragmentaion Control Time ranging codes:
M900 Pre-1970
M901 1970-1971
M902 1972-1981 (8126)
M903 1981 (8127) onward
M905
Attribute rn = 910 Codes generated from registry numbers.
Only searchable from 1981
Attribute wd = 911 Wide Disclosure. Only searchable from 1981
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence minOccurs="1" maxOccurs="1">
<xsd:element ref="FCodes" minOccurs="1" maxOccurs="1"/>
<xsd:element ref="RINs" minOccurs="0" maxOccurs="1"/>
<xsd:element ref="SCNs" minOccurs="0" maxOccurs="1"/>
<xsd:element ref="MCNs" minOccurs="0" maxOccurs="1"/>
<xsd:element ref="DRNs" minOccurs="0" maxOccurs="1"/>
<xsd:element ref="DCRs" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
-
Help on web.xml file, what if the parameters contains key words ?
Hi:
I am just wondering what should I do if I want to include key words suchs
as <param> in web.xml file for a servlet config.
Example:
<servlet>
<servlet-name>testServlet</servlet-name>
<parameter>
<param-name>some name</param-name>
<param-value>some value</param-value>
</parameter>
</servlet>
What should I do if I want to repleace 'some value' with '</param-value>some
value' and still to prevent the engine to terminate parsing the param-value
at the fake ending? Is there a standard way in XML to distanguish that?
(in URL format it can be replaced %xx for some chars).
ie,
<param-value> </param-value>some value</param-value>
where the second </param-value> is the real ending.
Thank you!
GangHi!
You can use "& lt ;" and "& gt ;" xml entities for that. Or wrap text element in <![CDATA[...]]> section.
Regards,
Ignat. -
Hide or Import Original XML?
I have an original XML file that is being imported into InDesign and transformed with XSL and I want the original structure to be included (it is required for export and re-ingestion into a CMS) but I want to only show the XSL transformed data while retaining the original XML. Is there a way to hide XML tags or reimport the orginal XML file at export (maybe scripting?) in InDesign?
As an example, I have an XML file that looks like this (actual XML will contain many more fields, this is an example):
<Object>
<id>3425</id>
<name>Title of object</name>
<description>A description</description>
<extraTag1>Some extra tag not needed in InDesign but required for re-importing</extraTag1>
<extraTag2>Some extra tag not needed in InDesign but required for re-importing</extraTag2>
<Content>
<Content>Some body text required</Content>
<relatedObjects>
<relatedObject id="234" />
<relatedObject id="244" />
</relatedObject>
</Content>
</Object>
that will be transformed into something like this (with an XSL file on import):
<Object>
<id>3425</id>
<title1>Title of object <title2>A description</title2></title1>
{* Combination of name and description tags from original XML above *}
<body>Some body text required</body>
{* Pulled from Content/Content path of original XML above *}
</Object>
When I export the XML data from InDesign I need the original XML structure to be exported (using the data above re-mapped to the original structure). That is why I need to know if there is a way to hide tags (so I would stuff the original XML into a hidden tag that would be ignored by InDesign except for export). Or perhaps is there a way, programattically or does InDesign pass parameters to the XSL file, that allow for importing the original XML file on export through JavaScript or XSL?
Put simply, I either need to hide the orginal XML in the transformed XML upon import or be able to have a path to the original XML passed to the export XSL file so I can restructure the data the way it came in... any ideas?You don't say whether you intend to make changes to the XML that's imported into InDesign. Presumably you are, otherwise there's no need to get it back out, correct?
If you are doing an XSLT transform on the XML imported into InDesign, you'll have to do the "reverse" transformation via XSLT on export. This unless you aren't modifying the XML data in any way.
"Hiding" isn't possible because two XML entities can't refer to the same InDesign element. Importing both the transformed and original XML is useless for the same reason: InDesign will update one but not the other.
Are you certain that you need to transform the XML to use it in InDesign?
HTH, Charles -
I ask this question because I came upon a surprise in reviewing the XMP and XML specifications.
XML, it seems, must start <?xml ...>
But XMP can start <?xpacket ...>
It seems to me that this means that an XMP document/packet therefore, while it contains valid XML entities, is not of itself valid XML (but could be converted by adding a correct prolog). Is this correct? Or are we depending on the language in the XML spec which says "XML documents should begin with an XML declaration" (should rather than shall)?I am having similar problem. Did you find the solution for this
thanks -
Error when using CDATA in orm.xml
Hi everyone!
I am writing an application using TopLink Essentials. Something really weird is happening when I use CDATA sections in my orm.xml file to declare named queries.
I declared a named query like this in my orm.xml file:
</named-query>
<named-query name="findLatestExchangeRate">
SELECT a
FROM ExchangeRate a
WHERE
a.code = :currency AND
a.date = (SELECT MAX(b.date)
FROM ExchangeRate b
WHERE b.code = :currency AND b.date &lt;= :before)
</query>
</named-query>
This worked like a charm.
Nonetheless, when I decided to use CDATA sections to declare the query and ovoid XML entities, somewhat like this:
<named-query name="findLatestExchangeRate">
<query>
<![CDATA[
SELECT a
FROM ExchangeRate a
WHERE
a.code = :currency AND
a.date = (SELECT MAX(b.date)
FROM ExchangeRate b
WHERE b.code = :currency AND b.date <= :before)
]]>
</query>
</named-query>
Then the weirdest thing happen. I am not even able to create the EntityManagerFactory. I get an error that says:
Exception in thread "main" Local Exception Stack:
Exception [TOPLINK-8028] (Oracle TopLink Essentials - 2.0.1 (Build SNAPSHOT (02/01/2008))): oracle.toplink.essentials.exceptions.EJBQLException
Exception Description: Syntax error parsing the query [findLatestExchangeRate:
], line 1, column 41: unexpected end of query.
Internal Exception: line 1:41: unexpected token: null
Does anyone has any idea of what could be going wrong here?
Thanks in advance for any help you can give me.
Edited by: [email protected] on Oct 13, 2008 1:10 PMI tried it in EclipseLink 1.0.1 and had no problems. I would recommend filing a bug against TopLink Essentials in case there is a known work-around.
If you are using TopLink Essentials as a supported Oracle TopLink user please consider upgrading to Oracle TopLink 11g (includes EclipseLink) or if that is not possible please open a service request with Oracle support.
Doug -
Hi!
Are there any good 'ready-made' translators out there?
I'm parsing an xml feed consisting of a lot of elements with CDATA-sections.
Stuff like:
<p>
</br> is common.
I need to translate the html entities to xml entities since I will put the data in a new xml file - without CDATA
sections.
Well, best case scenario would be to translate. Second best would be to strip out the html entities.
/best regards, Håkan Jacobsson - System developer in Stockholm, SwedenThere are tools for converting HTML to XHTML out there, yes. Some of them are written in Java and some aren't but I'm not sure that should matter to you.
I didn't understand what the part about CDATA meant, but generally parsers will convert CDATA sections to the equivalent text elements without even having to be asked. -
Hi
I need to display a large xml content(raw) which is returned as a String in jspx(adf page). i need to render the raw XML content in my panelgrouplayout . How to go about this??
Thanks
ChayaCan you explain more your case? When you say render do you refer to just visualize the xml content or use it to render a part of the page?
If is just to visualize the xml content you can use a component like af:outputText, it should be able to escape the xml entities.
AP -
Hi everybody,
I've a problem with the JNLP file syntax which makes me wonder, if JNLP is really an XML format. I need to store a servlet URL in a JNLP file as parameter for my application. This URL looks like "http://myserver/servlet?p1=v1&p2=v2", i.e. it contains an ampersand, which should be encoded as & in an XML file.
(I am not an XML guru, though.)
I've 2 different places where I need to put this kind of URL,
in the <resources/> section as property:
<property name="myURL" value="..."/> and in the <applic-desc/> section as argument:
<argument>...</argument>
In both cases, I've found that the application gets the strings exactly as stored in the JNLP file, i.e. the "&" is not replaced by "&". I can believe that this is o.k. for the <property> where the string is enclosed in quotes (but how to encode a quote in such a string?), but for the <argument/> case there should be the standard encoding rules used, replace 'less than', 'greater than' and 'ampersand'!
How should I encode a "<" ">" inside a program argument?
When I put the string into the JNLP file with the pure "&" JWS will happily pass the correct strings to the application. However, a XML syntax validator complains about a not well-formed XML file.
How should I handle this? Should I replace standard XML entities inside property values and program arguments manually?
Thanks in advance for any help on this.
Udo HempelThis is a known bug in 1.4.2 and previous Java Web Starts.
It is fixed in the upcoming 1.5 release.
/Dietz
Maybe you are looking for
-
Hi all, I have a production issue and my report takes around 4 to 5 hours for its execution and i've finded out that the 2nd from first query has a corresponding tale with it and when i modified it to below one its displaying the output and when i c
-
Excel changes needed from RTF Template
Hi all, I created RTF template which it publish in excel format.I am getting correct report but here i want some Excel settings from RTF template. These all properties i want in Excel output file which is generated from RTF. 1) Page number must be d
-
Performance Issue in UNION ALL....
Hi, I have a performance issue in a query using select.. union all . There are few select statements which are joined by union all. I need to re-frame the query such that the records from each individual select statement can be appended into a collec
-
I'm stuck after I delete onEnterFrame
I've made a lot of progress on this file thanks to some help from the forum. I've reached a point I can't figure out. In my released() function, I need to call a delete onEnterFrame so that the scripted tweens can run. But how do I "reinstate" the on
-
Can i install photoshop cs5 under xp sp2 ,someone can do it? i can't
Hi reading the forum i found out some expert users are able to install cs5 under xp sp2 i guess it needs sp3 is there a way to install under sp2,because i don't want to upgrade to sp3 i tried to to install under xp sp2 , but the install doesn't start