How to persist local entity reference?

I had a remote entity bean A hold a reference to a remote entity bean B's handle. Now I change them to local entity beans. But Local entity bean doesn't support Handle and I found local entity stub is not even Serializable (WebSphere5.0). How do I persist local entity bean B's reference? This is kind of non-container managed relationship. Why ejb2.0 spec doesn't support local entity Handle? How do you do non-container managed relationship without handle?

"I had a remote entity bean A hold a reference to a remote entity bean B's handle."
You hold a reference; as in an instance variable? If so, how did you use the handle? What did you do with the reference when the entity was stored or passivated?
"Now I change them to local entity beans. But Local entity bean doesn't support Handle... Why ejb2.0 spec doesn't support local entity Handle? "
Handle objects are intended to assist with holding for long-lived references to remote objects by avoiding the potential problems associated with holding a reference directly to the remote object. Since there are no concerns with respect to working remotely, Local objects do not need a Handle. Just hold reference to the Local directly, like you would any other object.
"...and I found local entity stub is not even Serializable."
Well of course not, it's not a remote object. One of the main points driving the use of local interfaces is to limit access to components. Hence only components within the same JVM as the Local can access it.
"How do I persist local entity bean B's reference?"
What do you mean by "persist"? Were you actually storing the Handle object into the database?! If so, then I see why you wanted a serializable Local Handle.

Similar Messages

  • How to persist an entity with (any) Serializable Java Object as a field?

    Hello,
    I've understood, that in addition to basic and primary types, an entity bean can have basically any serializable object as its field. I just can't get it working. All I want, is just to have an entity bean with, for example, a HashMap or Properties as one of the its fields. And afterwards, when I'd query the bean again from the persistent storage, it would have the HashMap or Properties fields set just as they were while persisting the bean. So the basic functionality.
    So far, the only way I've gotten this working, is by defining the field as byte[] and then by using ObjectInput/OutputStreams and ByteArrayInput/OutputStreams I can read/write my HashMap or Properties as a byte[] and persist the entity... Not very clever, is it :)
    I've tried to annotate the field with @Lob but it eventually ends up with casting problems when fetching the data from the persistent storage, because TopLink gets a blob, a byte array from the persistent storage and doesn't know how to convert it into HashMap or Properties like I want it to.
    This was close to mine, but still didn't get it working..
    http://forum.java.sun.com/thread.jspa?threadID=749447&messageID=4287919
    ps. Working with AS PE9, MySQL and PostgreSQL..
    Best regards,
    Samuli

    Hello,
    Sorry, I'm not sure what you mean. The ID used for the entity does not need to match the actual database constraints, so you can use any mapping in the entity as the ID as long as its value will be unique. If it is not unique, you will run into problems when EclipseLink thinks the entity already exists, performing an update instead of an insert.
    Can you describe the performance problems you are having, and what type of sequencing you are using? It is possible to improve performance using batch writing and sequence pre-allocation.
    See http://wiki.eclipse.org/Optimizing_the_EclipseLink_Application_(ELUG)#How_to_Use_Batch_Writing_for_Optimization
    and http://wiki.eclipse.org/Optimizing_the_EclipseLink_Application_(ELUG)#Table_11-11 for some of the options available.
    Best Regards,
    Chris

  • How to resolve local entity declarations?

    hi,
    I have an xml instance document that starts<?xml version='1.0'?>
    <!DOCTYPE ROOTELEMENT SYSTEM 'http://www.farming.com/warhorse/warhorse.dtd' [
        <!ENTITY R "Romance">
        <!ENTITY WAR "War">
        <!ENTITY COM "Comedy">
        <!ENTITY SF "Science Fiction">
        <!ENTITY ACT "Action">
    ]> does anyone know how to intercept the values like "Romance" "War" "Comedy" and replace them before they are substituted? EntityResolver seems very close but doesn't report these Entitys (!!!)
    the parsing code i'm playing with is import java.io.*;
    import java.net.*;
    import java.util.*;
    import org.xml.sax.*;
    import org.xml.sax.ext.*;
    import org.xml.sax.helpers.*;
    import javax.xml.parsers.*;
    import javax.xml.transform.sax.*;
    class SAXTest {
        static class CustomResolver implements EntityResolver {
            public InputSource resolveEntity (String publicId, String systemId) {
                StringReader strReader = new StringReader("This is a custom entity");
                System.out.println("HELLO: "+publicId+"#"+systemId);
                return null;
        static class MyDTDHandler implements DTDHandler {
            public void notationDecl(String name, String publicId, String systemId) throws SAXException {
                System.out.println("nD("+name+", "+publicId+", "+systemId);
            public void unparsedEntityDecl(String name, String publicId, String systemId, String notationName) throws SAXException {
                System.out.println("unparsedEntityDecl("+name+", "+publicId+", "+systemId+", "+notationName);
        private boolean validating;
        private XMLReader xmlReader;
        public static void main(String[]arg) throws Exception {
            XMLReader xmlReader = XMLReaderFactory.createXMLReader(); //"com.sun.org.apache.xerces.parsers.SAXParser");    
            xmlReader.setEntityResolver(new CustomResolver());
            xmlReader.setDTDHandler(new MyDTDHandler());
            System.out.println(xmlReader.getClass().getName());
            // http://sax.sourceforge.net/?selected=get-set
            xmlReader.setProperty("http://xml.org/sax/properties/declaration-handler", new DeclHandler() {
                public void attributeDecl(java.lang.String eName, java.lang.String aName, java.lang.String type, java.lang.String mode, java.lang.String value) {}
                public void elementDecl(java.lang.String name, java.lang.String model) {}
                public void externalEntityDecl(java.lang.String name, java.lang.String publicId, java.lang.String systemId) {
                    System.out.println("3");
                public void internalEntityDecl(java.lang.String name, java.lang.String value) {
                    System.out.println(name+" "+value);
            xmlReader.setFeature("http://apache.org/xml/features/validation/schema", true);
            xmlReader.setFeature("http://apache.org/xml/features/validation/dynamic", true);
            FileInputStream fis = new FileInputStream(arg[0]);
            xmlReader.parse(new InputSource(fis));
    }running the above code on the above file gives this outputy:\java\misc>java SAXTest Y:\i2work\test\collect\sourceVRTEntity\partlist.xml
    com.sun.org.apache.xerces.internal.parsers.SAXParser
    R Romance
    WAR War
    COM Comedy
    SF Science Fiction
    ACT Action
    HELLO: null#http://www.farming.com/warhorse/warhorse.dtd which shows only the DOCTYPE reference is actually going through EntityResolver - the other stuff that goes through DeclHandler is useless as the API doesn't give a chance to resolve their values to something different
    thanks,
    asjf

    Perhaps implementing org.xml.sax.ext.LexicalHandler and using the startEntity and endEntity methods?
    TransformerHandler is a subinterface of that so if you're already using a TransformerHandler you're
    halfway there to trying that.thanks - it sounds like TransformerHandler is for doing XSLT style processing? I've not yet found much documentation on this but will have a look further into it..
    I'm assuming i've configured something wrong atm since i'm sure it should work :)
    ie
    A) instance document contains general external entities
    B) SAX documentation say EntityResolver should report any general external entities
    but
    C) some general external entities are not being reported.. !
    ANT seems to be able to do some things with locally declared entities, so i've downloaded the sources and am about to have a rummage through them..
    eg an this ant file works - I don't know if this indicates the references are truly going through an EntityResolver tho.. <!DOCTYPE project [
        <!ENTITY semisemisemi "&semi;&semi;&semi;">
        <!ENTITY semi ";">
    ]>
    <project name="entity_test" default="go">
        <target name="go">
            <echo message="&semisemisemi;"/>
        </target>
    </project>asjf

  • How to persist an entity with Composite primary key

    Problem Statement:-
    Entity A have many to one relation with Entity C
    Entity B have many to one relation with Entity C
    Entity C have a composite primary key of (Entity A PK & Entity B PK)
    A --< C
    B --< C
    the entites are automatic generated by Dali tool
    @Entity
    public class C implements Serializable
         @EmbeddedId
         private C.PK pk;
         private int attribute;
         //Code
         @Embeddable
         public static class PK implements Serializable
              public int A_Id;
              public int B_Id;
              //Code
    @Entity
    public class A implements Serializable
         @Id
         private int AId;
         @OneToMany
         private Set<C> C_Collection;
         //Code
    @Entity
    public class B implements Serializable
         @Id
         private int BId;
         @OneToMany
         private Set<C> C_Collection;
         //Code
    i made a session Bean which add a new entity C
    Session
         A a = em.find(A.class, AId);
         B b = em.find(B.class, BId);
         C c = new C();
         C.PK pk = new C.PK();
         pk.AId(a.getID());
         pk.BId(b.getID());
         c.setPk(pk);
         c.setA(a);
         c.setB(b);
         c.setAttribute(12);
         em.persist(c);
    when running this code an exception is raised
    Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2006.8 (Build 060830)): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Unknown column 'A_ID' in 'field list'Error Code: 1054
    Call:INSERT INTO C (attribute, Aid, A_ID, B_ID, Bid) VALUES (?, ?, ?, ?, ?)
         bind => [2, 6, 6, 1, 1]
    this is logic as Table "C" has only 3 coloumns only "attribute" , "Aid" , "Bid"
    but the mapping is different as it adds the composite PK attributes to the insert statement
    if there is a sample code or how to solve this issue it would be great

    Hello Juwen,
    The problem is you are registering an object, assigning it a null pk, and then commiting the uow/transaction. TopLink uses registered objects to keep track of changes you make inorder to persist those changes on commit. So the simple fix is to not commit the UnitOfWork - call release() on it instead.
    Another solution is to use the session copyObject api. The simple form that only takes an object will work similar to registering the object as it will copy all persistent attributes but it will leave the primary key null. You can also use this method to specify a copyPolicy to customize the process. Using this method will be a bit more efficient, since a UOW makes both a working copy and a back up copy of objects registered, inorder to keep track of changes. Using the copyObject api will only make a single copy.
    Best Regards,
    Chris

  • How can I get a reference to the Local interface of a EJB 3 session?

    Hi,
    How can I get a reference to the Local interface of a EJB 3 session?
    My session implements both the local and remote interfaces, so in my client, when I look up the remote interface using the following code, I did get a reference
              processor = (IItemProcessorRemote)initialContext.lookup(IItemProcessorRemote.class.getName());but if I also look up the local interface in th eclient using this:
    processorLocal =(IItemProcessor)initialContext.lookup(IItemProcessor.class.getName());I got errors like the following, do you know why? Thanks a lot!
    Exception in thread "main" javax.naming.NameNotFoundException: sessions.IItemProcessor not found
         at com.sun.enterprise.naming.TransientContext.doLookup(TransientContext.java:203)
         at com.sun.enterprise.naming.TransientContext.lookup(TransientContext.java:175)
         at com.sun.enterprise.naming.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:61)
         at com.sun.enterprise.naming.RemoteSerialContextProviderImpl.lookup(RemoteSerialContextProviderImpl.java:116)
         at sun.reflect.GeneratedMethodAccessor114.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:121)
         at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:650)
         at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:193)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1705)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1565)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:947)
         at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:178)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:717)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:473)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1270)
         at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:479)

    BTW, findItemByTitle(String title) is a business method in my ItemProcessor session bean.
    public String findItemByTitle(String title) {
              AuctionItem item;
              String result = null;
              try {
                   Query query = entityManager
                             .createNativeQuery("SELECT i from AuctionItem i WHERE i.title LIKE : aTitle");
                   query.setParameter("aTitle", title);
                   item = (AuctionItem) query.getSingleResult();
                   result = item.toString();
              } catch (EntityNotFoundException notFound) {
              } catch (NonUniqueResultException nonUnique) {
              return result;
         }

  • How to create a local object reference variable in teststand sequence file programatically using C#

    I want to create a local object reference variable in a TestStand sequence file programatically using C#.

    Hi,
    Accoring to your reply in this Thread
    http://forums.ni.com/ni/board/message?board.id=330&thread.id=26984
    Just try this example. There you will create a numeric variable during excuting a sequence!
    Hope this is what you are looking for. 
    Please attach all your questions here.
    juergen
    =s=i=g=n=a=t=u=r=e= Click on the Star and see what happens :-) =s=i=g=n=a=t=u=r=e=
    Attachments:
    CTestStandDialog.zip ‏31 KB

  • BC4J DAOs vs. Local Entity Beans

    We are beginning a brand new project and trying to evaluate the costs/benefits of using BC4J entity objects versus local entity beans for our persistence needs.
    I've read the "Simplifying J2EE and EJB Development with BC4J" white paper including the "How Does EJB 2.0 Change the Picture?" section, but that seems to have been written at a time when EJB 2.0 support was a rarity.
    I'd like to get some feedback from people who have had experience with both. We are basically starting this application from scratch, although we have relational tables from our legacy C++ application that will serve as the basis for the Java object model. So what would we gain/lose by using entity objects?
    I must admit, I'm leaning toward using entity beans over a vendor-specific persistence framework, but if there are compelling reasons to choose entity objects (besides those mentioned in the white paper), I'd like to hear them. Please speak slowly, as I'm new to BC4J. :)
    Thanks for your time.

    I've read the "Simplifying J2EE and EJB Development with BC4J" white paper including the "How Does EJB 2.0 Change the Picture?" section, but that seems to have been written at a time when EJB 2.0 support was a rarity.IMO there's no change.
    What Sun doesn't tell you in the specs, but is much talked about on theserverside.com and in most
    anti-patterns threads, and in the up coming book J2EE Anti-Patterns; EJB Entities are basically
    broke with no solution. Reason: EjbStore() can throw an exception due to DB constraint violation
    after the business method returns. This drives the scenario where all business integrity is
    forced up into the middle tiers (EJB and business mediator tiers). etc etc ... EJB Entities are
    useful for the 5% to 1% of a business model and application that is transactional IMO.
    I.E. 95%++ of most apps/web sites are read only. Why use a heavy and expensive transactional
    component for reading rows from a DB to be displayed on an Inventory screen? The only reason
    to do this is if you have stock in Sun and your appserver vendor or want your project to last
    forever or get canceled. -- Seriously, do your home work, using Entities as your persistance
    tier mediator, for the 95% of your project that's read only, and for reports which involve
    joins, select criteria etc etc will be a serious problem to just code and even bigger problem
    to be responsive and scalable.
    Do this experiment: implement a report that joins several tables, selects on where criteria,
    orders by some attribute in EJB Entity bean technology. Seriously try to code this solution.
    Hint: spray water on your appserver box since it'll almost explode. :)
    Then try: do the same report in SQL. One SQL statement usually will do it and it's all in the
    DB. The data returned to the middle tier is ready for JSP formating.
    Try another EJB experiment: implement a finder based on criteria that returns a Collection.
    Do the same in SQL: time the perf difference.
    Hint: Maybe you're getting the picture, that EJB Entity 2.0 --> 10.0 what-ever, never wrote into
    the specs any means for joins, or high perf finders based on criteria.
    My opinion and experience: EJB Entity is good for one portion of a project if that; the single
    part that's transactional (usually the shopping cart or similar). All other data access needs
    to be through a DAO tier that's SQL based. With BC4J you get transactional support too, so
    why bother with EJB, except to be wrapped by SLSB's for remotability from the client.
    I'd like to get some feedback from people who have had experience with both. We are basically starting this application from scratch, although we have relational tables from our legacy C++ application that will serve as the basis for the Java object model. So what would we gain/lose by using entity objects? I'm at the end of phase one of a medium scale BC4J project which was initiated after scrapping
    a Sun Blueprint J2EE 1.2 architecture for the above reasons, plus the unmentioned time to market
    issue. We found hand coding the Sun architecture to be 400% slower, if you don't hit any of the
    above mentioned bumps in the road. We never got to reports, which would have been imposible without
    custom DAOs.
    I must admit, I'm leaning toward using entity beans over a vendor-specific persistence framework, but if there are compelling reasons to choose entity objects (besides those mentioned in the white paper), I'd like to hear them. Please speak slowly, as I'm new to BC4J. :)You're not the first to ask this question nor the last. Sun's happy talk in the face of their
    king has great cloths sell job to fend off .net will take more than just J2EE Anti-patterns books
    to displell. Try the reports and finders experiements in EJB 2.0. You'll no doubt learn alot
    and read more news group posts in the process.
    Heck, you might even discover that 903 oc4j's CMR and EQL can instantiate 1000's of Entity beans,
    JNDI entries, return a Collection of handles, your client get the ValueObjects and build a report
    in less than a minute and 100's of customers can do this simultanteously. __NOT__ :)
    Cheers,
    curt

  • How to Remove the Entity usage from View object at runtime

    Hi,
    A ViewObject can be created dynamically based on the Existing ViewObject Defintions. The newly created dynamic ViewObject will have all the defintion including Attributes, its structure along wtih Entity usage of the existing ViewObject definition.
    My requirement is i don't want to have the Entity usage alone whereas Remaining structure need to be retained.
    Can any body suggest on how to do it.
    regards.

    Hi,
    design time or runtime? At designtime, have you tried to just remove the entity reference? Given the disadvantage of removing the entity (and the changed behavior associated with it) what is the use case for which you want to disable the entity reference?
    Frank

  • Entity Reference difficulties

    I'm trying to generate an XML so that it shows the Entity References. I need help figuring what I'm doing wrong. Complete source is included below.
    When I run the included source, I get:
    <?xml version="1.0"encoding="UTF-8"?>
    <xmlTest>
    <polish text1="�"/>
    </xmlTest>But what I really want is:
    <?xml version="1.0" encoding="UTF-8"?>
    <xmlTest>
    <polish text1="& # 0 2 2 5 ;"/>
    <note value="Note that the forum is too smart for my special formatting. Please disregard the spaces in between each character in the previous element. This current element is just a note is is also to be ignored."/>
    </xmlTest>Source:
    import java.io.*;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.transform.OutputKeys;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.*;
    * @author pclement
    public class XmlTransformerEntityIssue {
        /** Creates a new instance of XmlTransformerEntityIssue */
        public XmlTransformerEntityIssue() {
        public static void main(String a[]) throws Exception {
            XmlTransformerEntityIssue test = new
    XmlTransformerEntityIssue();
            test.execute();
        public void execute() throws Exception {
            Document doc = generateTempDoc();
            StringBuffer text = transform(doc);
            doc = null;
            System.out.println(text);
            File file = File.createTempFile("xkgjfhfhf", ".xml",
    new File("c:/temp/"));
            FileWriter w = new FileWriter(file);
            w.write(text.toString());
            w.flush();
            w.close();
            file = null;
        private Document generateTempDoc() throws Exception {
            DocumentBuilderFactory factory =
    DocumentBuilderFactory.newInstance();
            factory.setValidating(false);
            DocumentBuilder docBuilder =
    factory.newDocumentBuilder();
            Document doc = docBuilder.newDocument();
            Element xmlTest  =
    (Element)doc.createElement("xmlTest");
            // try polish
            Element node = (Element)doc.createElement("polish");
            node.setAttribute("text1", "\u00E1");
            // append element
            xmlTest.appendChild(node);
            node = null;
            doc.appendChild(xmlTest);
            return doc;
        private StringBuffer transform(Document doc) throws
    Exception {
            TransformerFactory tFactory =
    TransformerFactory.newInstance();
            Transformer transformer = tFactory.newTransformer();
            DOMSource source = new DOMSource(doc);
            StringWriter writer = new StringWriter();
            StreamResult result = new StreamResult(writer);
            transformer.transform(source, result);
            doc = null;
            return writer.getBuffer();
    }

    Turns out, that the character '�' CANNOT be
    e represented raw in UTF8. As UTF8 uses the first
    128 chars for English, it uses the rest for special
    formatting. It is quite well documented.I don't know what you mean by "raw" here. Your characterization of UTF-8 is wrong, although Microsoft's description is correct. It is possible to represent &aacute; in UTF-8, it just takes two bytes. I suppose you might call this "special formattting" but I certainly don't. That's just how UTF-8 represents characters.
    http://msdn.microsoft.com/library/default.asp?url=/lib
    rary/en-us/dnxml/html/xmlencodings.aspYou might want to read this article too:
    http://skew.org/xml/tutorial/
    I feel it describes things better for Java users.
    After having read MS's site, I then went to
    O'Reilly's Java Internationalization book. On pages
    166 and 167 is where the following block of code came
    from:
    byte bytes[] = text.getBytes("UTF8");
    return new String(bytes);
    I don't have the book. Perhaps there's a context where that code is meaningful. There are certainly plenty of contexts where it is not.
    I realize that it's a lot easier to read and comment
    than to do a POC (proof of concept). But I'm not
    sure why you say that the original XML is fine!Looks like I was wrong about that. Apparently you were not generating the original XML correctly. Still, you shouldn't have to resort to hacks like that to get non-ASCII characters into XML. It looks like you read it from a UTF-8 encoded file, incorrectly using your system's default encoding. In that case the O'Reilly hack would reverse that error. At least it would for that particular character. If it had been a Chinese character it probably wouldn't have worked.
    The new code runs quite well and comes from O'Reilly
    - a source I trust.It's hard to argue with working software.

  • Non-Latin is converted into entity reference in "Copy Text" of Extract

    The Japanese (other than Latin) text which I copied in a clipboard is converted into entity reference when I perform "copy text" in a letter layer using Extract for Brackets.
    Is this problem a known thing? This does not rise in Extract of Creative Clouds, Dream Weaver.
    An example:
    Oh, it is → &#12354;
    아 → &#50500;
    أ نا ← &#1571;&#1606;&#1575;

    Hi Bernard,
    This is really a 'browser issue' (which is probably not what you wanted to hear). Since it's up to the browser how it handles copy/paste.

  • "Error in processing external entity reference" - why?

    -- FM 8.0p277, structured --
    Saddened to see this morning that FM apparently decided against saving the work I did yesterday afternoon ... I can sympathise with the idea of not saving imperfect documents, but it could at least have warned me!
    First attempt at saving this morning throws up the following message.
    ] XML Parser Messages (Document Prolog)
    ] Error at file P:\ACM\smu\ditabase.dtd, line 71, char 17, Message: Could not open external entity 'P:\ACM\smu\indexingDomain.ent'
    ] Parse error at line 71, char 0: Error in processing external entity reference
    * I certainly haven't created any .dtd, so where might this defective file have come from?
    * ditto for defining entities
    So - what's the root problem, and how do I set about correcting it?
    [ps] I get exactly the same message when I use the FM DITA menu to create a brand-new topic.

    Hey Niels...
    That *shouldn't* be happening if you're using an unmodified FM8 install .. especially with creating a new file. It sounds like something has gone awry in your install. This will often happen if the doctype declaration in the XML file is defined as a system resource rather than with a public ID (but that shouldn't be happening unless you're creating the file with another editor or using a file created by someone else).
    Some things to check ..
    - Open the DITA > Options dialog .. is "DITA-Topic-FM" selected as the "Topic application"?
    - When you open a file from disk, do you select "DITA-Topic-FM" as the structure application? (You may not get an option to do so .. that's OK.)
    - Choose .. Structure Tools > Edit Application Definitions .. locate the XMLApplication node that is labeled "DITA-Topic-FM" .. below that you'll see entries for Template, DTD, and Read/write rules. Check that the files specifed actually exist at the locations specified (note that "$STRUCTDIR" maps to the FrameMaker/Structure/ folder).
    - Have you installed FrameMaker in a "nonstandard" location?
    I may be missing something obvious, but this is probably a good start.
    Cheers,
    ...scott

  • Xslt output options for predefined entity references

    Are there plans to include options for controlling the output of XSLProcessor for predefined entity references?
    I haven't read the XSL spec by W3C, but I suppose that when <xsl:output method="html"> or method="text" is set all the XML predef. entity references (&;, &apos;, etc.) have to be output as charachters, not as &apos, &#39, etc.
    How is <xsl:output> going to be treated in the incoming version(s) with respect to entity references?
    In any case may be it is better to include a programatic way of controlling the output?

    I have a similar problem with the ampersand ent. ref. In the xsl file it has to be writen as and entity ref., but in the html output it must appear as character. However in the html file I'm also getting an entity reference.
    By the way, are you using xsl transformations for the bulletin board? In the previous post the software translated the ampersand ent. ref. into character, but not so the apostrophe.
    And generally can you tell me, how can I prevent the bb software from translating entity references :?)

  • Ignoring entity references

    Does anyone know how to get the xmlparser wto ignore(pass through without decoding) character entity references?
    I'm using XML as a mechanism to move inserts, updates, and deletes from non-oracle databases into Oracle. The
    XML is put in an A.Q. and then parsed on the Oracle side into sql statements.
    We have entity references like &deg; that we would like the parser to leave alone. We could then insert the reference
    into the database and Web browsers would decode it at retrieval time. Note - we are not using the 9i XML datatype to
    store this data - it is parsed into varchar columns. Currently the parse knows only about the 4 or 5 standard references.
    When it sees one that is not in the DTD it pukes.

    Entity reference means that you use some encoding that does not have
    e.g. character � then you must declare entity references in dtd like:
    <!ENTITY uacute     "�"> <!-- LATIN SMALL LETTER U WITH ACUTE -->
    and in xml:
    <myTextElement>Per&uacute;</myTextElement>.
    but if you have the character in xml like this
    <myTextElement>Per�</myTextElement>
    then you must add encoding to <?xml version="1.0" encoding="some-enc-that-has-eacute">accordingly.
    Anyway, to get rid of these kind of problems you should stick to utf-8 :-)
    BTW. Did I answer the right question?
    Kullervo

  • Escaping standard XML entity references

    I've been trying to find a way to escape the greater than sign as well as other chars in my xsl stylesheet. I've tried several tips from the postings, but none seem to work. What I need is for my xml to the characters escaped in the same way as the &amp; & ampersand and &lt; < less than chars are. I run into problems when I try to get the ampersand in next to other characters without a separating ;
    Thanks in advance.

    Vassago (guest) wrote:
    : 1) The XML-parser for Java does not expand entity references,
    : such as &[whatever], instead all values are null. How to fix
    : this? Code example would be greatly appreciated.
    : 2) It seems you cannot have international character (such as
    : swedish characters, w) as values for internal entities, i.e.
    : <!ENTITY Ouml "Y">
    : How to solve this problem?
    1) You probably have a simple error defining/using your entities
    since we've a number of regression tests that handle entity
    references fine. A simple example is:
    <?xml version="1.0"?>
    <!DOCTYPE po [
    <!ENTITY status "beta">
    ]>
    <po foo="bar">
    <comment> Alpha, then &status </comment>
    </po>
    2) What do you set your character set encoding to be?
    Oracle XML Team
    http://technet.oracle.com
    Oracle Technology Network
    null

  • You changed the order of the menu for "Open in a new window" or "Open in new Tab", How can I change it back? Or how can I omit any reference to tabs? I do not use them at all.

    You changed the order of the menu for "Open in a new window" or "Open in new Tab", How can I change it back? Or how can I omit any reference to tabs? I do not use them at all.

    You can use the Menu Editor add-on to rearrange or remove menu items - https://addons.mozilla.org/firefox/addon/menu-editor

Maybe you are looking for