Newbie Q about Frame 8 and XML

I am an experienced Frame user but have never used structure in Frame. We're all on 7.2 where I work but soon to upgrade to Frame 8.
In the marketing poop on Adobe's site they say you can use XSLT or DTD to open XML files in Frame, but I know that in the past you had to muck with something called EDDs as well.
What is the truth?
Here is one anticipated use of this ... we can get all the command line commands from developers as XML. We could also get them to give us the appropriate schema. To open and use that in Frame such that it would import and format the commands in a table, or headings with text, what is required in general? And also, where is this process documented?

Steve,
A structured document consists of a hierarchy elements, each consisting of other elements, text, or special FrameMaker formatting objects such as markers, cross-references, and anchored frames. Since an XML document also consists of a hierarchy of elements, consisting of other elements and text, it is possible to move data between FrameMaker and XML. However, nothing in XML indicates how the different elements are formatted, or even which are entire paragraphs and which are text ranges within a paragraph. If you want to produce formatted FrameMaker content, you need to configure FrameMaker to apply formatting automatically to different elements based on the context in which they occur
Document type definitions (DTDs) and schemas are XML constructs for defining the elements that are going to be used in a class of documents and the rules for which elements occur in which contexts. Element definition documents (EDDs) are the FrameMaker equivalent of a DTD along with a stylesheet. An EDD not only defines the element types to be used, but associates formatting with them as well. FrameMaker can generate an EDD from a DTD or schema and such an EDD will define the same element types as the XML definition, but will not have any formatting information.
XSLT is a transformation language that is used to generate HTML, text languages such as MIF or RTF, or other XML documents from an XML document. FrameMaker can run XSLT automatically when you move material between it and XML. XSLT is useful when you want to use a slightly different structure within FrameMaker and XML.
EDDs and moving material between FrameMaker and XML is documented in the online Structure Application Developer's Guide.
--Lynne

Similar Messages

  • Question about Java,XSLT and XML

    I am new to Java and XML. I'm not quite clear the relationship between Java,XSLT and XML.
    To exercise, I am going to write a Java program that makes embedded calls to an XSLT processor(XALAN), to produce results for several constrained transformations from a given XML document(x.xml) such as:
    1.Transform the x.xml (which satisfies d1.dtd) in such a way that it now conforms to the DTD d2.dtd. Output the resulting xx.xml document.
    2.query some information from the x.xml and then form an Html output.
    3.summary some information, do some statistics from the x.xml and then form an Html output.
    I don't konw which java classes and XSLT functions might be used.(Actually I don't know how/where to start).
    Can anyone give me some clue ?
    thanks a lot!

    You must provide XSLT stylesheeds to specify transformations (1), (2),
    and (3); let's call those stylesheets task1.xsl and so on.
    The following code will transform x.xml into xx.xml according to task1.xsl. It gives you an idea which packages and classes to use, but it doesn't teach you proper Java programming technics :)
    import java.io.File;
    import javax.xml.transform.*;
    import javax.xml.transform.stream.*;
    public class Test
        public static void main(String[] args) throws Exception
            TransformerFactory factory = TransformerFactory.newInstance();
            Source config = new StreamSource(new File("task1.xsl"));
            Transformer transformer = factory.newTransformer(config);
            Source source = new StreamSource(new File("x.xml"));
            Result result = new StreamResult(new File("xx.xml"));
            transformer.transform(source, result);
    }To read about XSLT, see:
    http://www.w3.org/TR/xslt
    there is a tutorial on using XSLT with Java:
    http://java.sun.com/xml/jaxp/dist/1.1/docs/tutorial/xslt/index.html.

  • Newbie Question about FM 8 and Acrobat Pro 9

    Hello:
    I have some dcouments that I've written in FM v8.0p277. I print them to PDF so that I can have a copy to include on a CD and I also print some hard copies.
    My newbie question is whether there is a way to create a  PDF for hard copy where I mainitain the colors in photos and figures but that the text that is hyperlinked doesn't appear as blue. I want to keep the links live within the soft copy. Is there something I can change within Frame or with Acrobat?
    TIA,
    Kimberly

    Kimberly,
    How comes the text is blue in the first place? I guess the cross-reference formats use some character format which makes them blue? There are many options:
    Temporarily change the color definition for the color used in the cross-reference format to black.
    Temporarily change the character format to not use that color.
    Temporarily change the cross-reference definition to not used that character format.
    Whichever method you choose, I would create a separate document with the changed format setting and import those format into your book, create the PDF and then import the same format from the official template.
    - Michael

  • Newbie question about JMS topic and OSB

    So here is what I want to achieve:
    I want to "front" a JMS topic on WLS using OSB 10g. I want the users (producers and subscribers) to be access the topic via proxy services. The way I picture this is that a producer will invoke a proxy to publish a message. The subscriber will (asynchronously) invoke another proxy to pickup the message.
    Is this possible and how do I go about doing this?
    thanks
    Edited by: user10341230 on Apr 28, 2010 8:49 AM

    Hi there,
    user10341230 wrote:
    I want to "front" a JMS topic on WLS using OSB 10g. I want the users (producers and subscribers) to be access the topic via proxy services. > it's not really clear what you want to achieve here.
    you say
    user10341230 wrote:
    The way I picture this is that a producer will invoke a proxy to publish a message.you need a proxy with whatever inbound protocol you like (http, file, mail...), which through a jms business service push the message to the Topic.
    you say
    user10341230 wrote:
    The subscriber will (asynchronously) invoke another proxy to pickup the messagethe subscriber can be either asyncrhnous, in which case you need a proxy service with inbound protocol jms. or as you probably need a synchronous one
    in which case you need another proxy with whatever inbound protocol you like whch once called in its pipeline calls some pojo class to read from this topic synchrnously (you need a durable subsciber).
    Regards,
    Tony
    ps: have a look http://download-llnw.oracle.com/docs/cd/E11035_01/wls100/jms/design_best_practices.html#wp1058694

  • Newbie question about C coding and SDK for iPhone app

    Hello,
    I am interested in trying to create an app. However, I have NO experience writing code I already have downloaded and installed the latest version of the SDK.
    I know I have to learn: C, Objective C, and Cocoa.
    I just picked up "C for Dummies" as a starting point. I figured the K&R might be a bit overwhelming to start with. Thing is, "C for Dummies" suggests doing some exercises in Text Edit and then using GCC to compile and test. But, then again, it has a copyright of 2004--long before Snow Leopard.
    My question is, do I really need to do the exercises in Text Edit? Can I just use Xcode for entering the code and testing it? And, any suggestions for learning C and Xcode tutorials are greatly appreciated.
    Thanks!!

    But, I really want to learn coding and not just take the easy route by using Xcode.
    The simplification of using Xcode may have been a bit exaggerated throughout this thread. You will still learn how to program full-on by using Xcode -- it's not like you're taking a shortcut or anything. Well, technically speaking, you are, but Xcode is the expected way to develop on a Mac nowadays -- it's how Apple expects you to develop and how most people are doing so. Should you choose, you can taking a deeper dive into the inner workings of compiling and whatnot by using a text editor and the Terminal, but keep in mind that the extra complexities here could complicate the more important overall goal of learning the basics of how to program. There is absolutely nothing wrong with simply using Xcode for the novice part of your programming days. In fact, it's probably the path I would recommend. Some here might suggest that it is beneficial to learn the intricacies of compiling through the Terminal and whatnot early on, and they are right -- it is beneficial, but the benefits of taking a route (at least for the time being) that allows you to focus on the more pressing issues of learning how to program without having to delve too deeply can be just as beneficial. After all, it's not like you can't go back and learn how to compile via Terminal later on -- that's what I've done (or, rather, am in the process of doing).
    I always thought Terminal was something not to mess with.
    Not so much. Like most things in programming (or life, for that matter), the Terminal is something not to mess with +if you don't know what you're doing+. Basically, it breaks down like this. The GUI that Apple has created for you in Mac OS X (by GUI I mean "graphical user interface" -- the icons and windows and buttons and so forth that you use to perform tasks on your Mac -- in other words, everything outside the Terminal) is geared toward the common user who does not need to access advance aspects of the system's functionality. Consequently, it makes common tasks much simpler to perform, but in the process it hides some of the deeper levels of the system's functionality from the user. This is a good thing, since most people wouldn't know what to do with this functionality and would create problems for themselves if they did have easy access to it. However, for some users who know more about the inner workings of the operating system, there needs to be a way for them to access this functionality, so that they can do certain things (like accessing certain files and performing certain tasks) that they would not be able to do using the Mac OS X GUI -- that's what the Terminal is for. It allows the user to operate the system on a lower level. In other words, it allows you to get closer to the operating system. This is good in a way, because it allows you to perform tasks that you wouldn't otherwise be able to perform by giving you more control over the operating system, but it is also bad in a way, because it can allow you to mess up some of the deeper aspects of your system if you don't know what you are doing. Most people leave the Terminal alone for this reason, and because they have no need of it, but if you want to be a good developer, you're going to have to work with it sooner or later.
    Now, with all that being said, it's not that easy to mess things up using the Terminal. It's not like your system's going to crash if you misspell a command. All in all, the Terminal is very forgiving, but it will do what you tell it to do, even if you tell it to kill itself, and it is for that reason that you need to know what you are telling it before you try to tell it something. If you understand what you are telling the system, than operating on a lower level and being closer to the operating system is completely safe.
    The Mac OS X operating system is based around Unix, so when you are communicating more directly with the operating system by using the Terminal, you are interacting with its Unix core. For this reason, using the Terminal goes hand in hand with understanding Unix. So, if you're going to want to use the Terminal, then I recommend you get a good book on Unix to teach you the basics of Unix commands and shell programming and whatnot. Any book on Unix will do, since more or less everything you learn will be applicable to the Mac OS X's Terminal, but there are a few that are specifically directed to Mac OS X users, and that always makes things easier. Most of these books aren't updated to cover past Tiger, but this really doesn't matter (someone correct me if I'm wrong). A few examples are O'Reilly's "Learning Unix for Mac OS X Tiger" by Dave Taylor or Peachpit Press's "Unix for Mac OS X Tiger" by Matisse Enzer. Also, the book "Unix Programming Environment" by Kernighan and Pike is an excellent book on Unix, although fairly outdated, so I would highly recommend it, although I would recommend it as a supplement to another, more recent, Mac-based Unix book and not as your primary source for learning Unix. The skills you will acquire from these books will help you later if not sooner, so I recommend giving one of them a read at some point, whether you are planning on compiling using the Terminal right now or not.
    Anyways, I hope this helped to clear some of this up for you, and please let us know if you have any further questions.

  • General questions about using webservices and xml as opposed to an oracle driver

    Dear Experts; I have a general question which I have yet to test. Is it faster to use an ODBC driver to connect and retrieve data from an Oracle database than creating a .net webservices and using an XML to get the data for your web application. THank you

    At some point in the architecture stack some component will need to access the database in order to get the information from the database. That component will need to use an Oracle client driver.

  • Newbie thread about global variables and result set

    Hello everyone this is my first post, im from colombia and now im learning about this world !! the WCC !!
    Now im doing a practice but im so noob that i cant get it so far... i wrote some of the oracle documentation.. and it was so usefull for starting.. but now im trying to do custom components builded in java + resources + services + template etcc .. all good stuff :D.
    i want to retrieve a result set coming from a custom service ... and then i want to store this result set in some kind of global variable !! why ? because i want to use this data from the result set again and again without making more call to the service !!
    ive tried to copy this resultset but i think it cant be done because i use a popUp window to display the rows from the RS.. and when i close the window .. it dies!!
    i want to use this RS for 3 custom metadata field.. but i have no idea how to do this....
    this is a part of my custom resource
    <$if fieldName like "xElaborador"$>
    <$executeService("SERVICE_ALLUSERS")$>
    <$trace(" ### executing service ###","#log")$>
    <!--i tried to copy the rs here but this is wrong i guess -->
    <$nuevoRS="usuarios_LDAP"$>
    <$endif$>
    <!-- usuarios_LDAP is the RS parameter coming from the java calss -->
    <$if rsExists("usuarios_LDAP")$>
    <$if rsFirst("usuarios_LDAP")$>
    <$loop usuarios_LDAP$>
    <$trace(" ### inside RS ###","#log")$>
    <$include each_user_LDAP$>
    <$endloop$>
    <$else$>
    <$include therearenotusers$>
    <$endif$>
    <$endif$>
    <!-- THIS CODE IS USELSS BASICALLY-->
    <$if fieldName like "xRevisor"$>
    <$if rsExists("nuevoRS")$>
    <$if rsFirst("nuevoRS")$>
    <$loop nuevoRS$>
    <$trace(" ### inside rs for revisor ###","#log")$>
    <$include each_user_LDAP$>
    <$endloop$>
    <$else$>
    <$include therearenotusers$>
    <$endif$>
    <$endif$>
    <$endif$>
    pls tell me if im too lost im all ears to learn the good practices for this tool.

    Hi ,
    One of the good resource on this topic is :
    http://jonathanhult.com/blog/2012/11/resultset-versus-dataresultset/
    Thanks,
    Srinath

  • Newbie question about using vectors and arrays

    I'm fairly new to JME development and java in general. I need some help in regards to Vectors and 1 dimensional arrays. I'm developing a blackberry midlet and am saving the queried info i pull back from my server side application with each record saved into the array and subsequently each array saved as an element in the vector, thereby creating a 2D "array".
    However I'm having a problem accessing the elements in the array. Here is a sample of what I mean and where I get stuck:
    Vector _dataTable = new Vector(1, 1);
    String[] r1 = {"a", "b", "c", "d"};
    String[] r2 = {"1", "2", "3", "4"};
    _dataTable.addElement(r1);
    _dataTable.addElement(r2);
    Object temp = _dataTable.elementAt(0); //Save the element as an new object for useNow how do I access the particular indexes of the element of the temp object? Do i need to caste it to an array? Is there another more efficient/easier way I should be storing my data? Any help would be great!
    Edited by: Sotnem2k1 on Apr 1, 2008 7:50 AM
    Edited by: Sotnem2k1 on Apr 1, 2008 7:51 AM

    Thanks for the feedback newark. I have this scenario below:
    // Class for my 1D array
    public class OneRecord {
        private String[] elementData = new String[4];
        public OneRecord() {   
            elementData[0] = null;
            elementData[1] = null;
            elementData[2] = null;
            elementData[3] = null;
        public OneRecord(String v1, String v2, String v3, String v4) {   
            elementData[0] = v1;
            elementData[1] = v2;
            elementData[2] = v3;
            elementData[3] = v4;
        public void setElement(int index, String Data) {
            elementData[index] = Data;
        public String getElement(int index) {
            return elementData[index];
    } Then in my main app I have:
    Vector _dataTable = new Vector(1, 1);
    OneRecord currRecord = new OneRecord("a", "b", "c", "d");
    _dataTable.addElement(currRecord);
    OneRecord temp = (OneRecord)_dataTable.elementAt(1);
    System.out.println(temp.getElement(0)); Are there more efficient data structures out there to save queried data from a server side app? Like I said, i'm still trying to learn the most efficient techniques of coding...esp for the Blackberry. Any suggestions would be great!

  • Newbie question about UML books and tools used in industry

    Hello,
    I'm learning OO topics and the UML at home, and began to wonder what books and/or software tools were used by professional software designers/engineers within the industry. I'd be grateful for your reply if you are a professional (or know one!). Thanks very much.

    1.
    Applying UML and Patterns: An Introduction to Object-Oriented Analysis and Design and the Unified Process (2nd Edition)
    http://www.amazon.com/exec/obidos/ASIN/0130925691/qid=1057291436/sr=2-2/ref=sr_2_2/104-7174831-4835950
    2. Hope it helps.

  • I have a acrobat reader, can I import text delimited data format to a PDF Form so that it can auto fill into forms that was created? If not, what about FDF and XML data

    I have a acrobat reader, can I import text delimited data format to a PDF Form so that it can auto fill into forms that was created? If not, what about FDF and XML data

    Yes, you can do all of that via Tools - Forms - More Form Options - Import Data, if you have Acrobat.
    If you only have the free Reader then you can still do it, but it requires a script.

  • Who knows about xdk: xslt vm and xml pipeline processor

    hello,
    i read anywhere that xslt vm and xml pipeline processor is
    part of the xdk.
    i would know more about xslt vm and pipeline processor,
    but where ??
    thank you!!

    Hi,
    XSLT VM is a high performance XSLT transformation engine in C.
    XML Pipeline Processor specifies Java processes to be executed in a declarative manner. W3C recommendation is at http://www.w3.org/TR/2002/NOTE-xml-pipeline-20020228/.
    Both of these are supported by Oracle in XDK 10i. More information at http://technet.oracle.com/tech/xml/xdk/content.html. Documentation at http://otn.oracle.com/docs/tech/xml/xdk/doc_library/Beta/index.html.
    Thanks.

  • Book about InDesign and XML

    Hello everybody!
    Has anybody read "A Designer's Guide to Adobe InDesign and XML" by James J. Maivald, Cathy Palmer (Adobe Press)? I am looking for a book about using xml in InDesign. And i'm hoping the title says it all: a guide to show me the basics. Or does anybody have another book I should read?
    Thank you for answering!
    Maaike

    It is a great book to begin for inDesign and XML.
    Strange enough there is NO mentioning at all of how to process tabels!
    Maaike, if you are Dutch take a look here:
    http://www.macmojo.nl/nl/artikelen/gratis-hoofdstuk-als-pdf-van-het-nieuwe-boek-slimmer-we rken-met-indesign-cs4.html

  • Frame 9 solution for table column + side head does not work in Frame 10 and 11

    In Frame 9 structured (DITA) we could force Frame to record the actual widths of table columns in the DITA XML.  Frame 9 would respect the widths when opening the file.  This was particularly useful for forcing tables to be wide -- to go across the column and the side head -- and for the columns to never resize. 
    In Frame 9 this was done by commenting out the line
    "writer use proportional widths;" 
    like this
    "/* writer use proportional widths; */"
    in the topic.rules.text" file located in
    "...\FrameMaker9\Structure\xml\DITA\app\DITA-Topic-FM"
    This no longer works in Frame10 and Frame 11.  Even though the same line is commented out in all the "NAME.rules.txt" files in all the subdirectories of
        "...\AdobeFrameMaker11\Structure\xml\DITA_1.2\app"
    and
        "...\AdobeFrameMaker11\Structure\xml\DITA\app"  
    and
        "...\AdobeFrameMaker10\Structure\xml\DITA_1.2\app"
    and
        "...\AdobeFrameMaker10\Structure\xml\DITA\app"  .
    Commenting out the line does force Frame 10 and 11 to record  the absolute column width (2.357" etc.) in the DITA XML.
    However, on Open,  Frame 10 and 11 force the table to fit in the column, not the column and sidehead. That is they behave as though they were still using proportional column widths.  It seems the original values (as inserted by Frame 10 and 11 before closing!) are recalculated on Open, thereby mimicking the default proportional width behavior.  
    For example, this on Save then Close from Frame 10 or 11
    <table frame = "topbot" colsep = "0" rowsep = "1">
    <tgroup cols = "4" colsep = "0" rowsep = "1" outputclass = "FormatB">
    <colspec colnum = "1" colname = "1" colwidth = "1.796in" colsep = "0"/>
    <colspec colnum = "2" colname = "2" colwidth = "1.852in" colsep = "0"/>
    <colspec colnum = "3" colname = "3" colwidth = "1.179in" colsep = "0"/>
    <colspec colnum = "4" colname = "4" colwidth = "2.152in" colsep = "0"/>
    goes to this on Open then Save: 
    <table frame = "topbot" colsep = "0" rowsep = "1">
    <tgroup cols = "4" colsep = "0" rowsep = "1" outputclass = "FormatB">
    <colspec colnum = "1" colname = "1" colwidth = "1.351in" colsep = "0"/>
    <colspec colnum = "2" colname = "2" colwidth = "1.393in" colsep = "0"/>
    <colspec colnum = "3" colname = "3" colwidth = "0.887in" colsep = "0"/>
    <colspec colnum = "4" colname = "4" colwidth = "1.618in" colsep = "0"/>
    Any help at all would be appreciated!  
    We have 8,000 to 10,000 pages to PDF in the next few days and about 33% of those pages are messed up tables!
    Message was edited by: borealforest

    Hi...
    Unfortunately, I don't have any insight into the default DITA table handling in FM10 or FM11 .. so can't give you the answer you're looking for. Since both FM10 and FM11 offer ExtendScript, you could write a script (or have one written) that processes all of your files to reset the table widths. Or, perhaps the best short term solution may be to reinstall FM9 to get the job done, then spend more time later to figure out a better solution.
    One alternative would be for you to use DITA-FMx, which supports the table/@pgwide attribute for controlling which tables span the page and which don't. Since your tables probably don't make use of this attribute, it won't help in the near term, but might make sense going forward.
    Cheers,
    Scott Prentice
    Leximation, Inc.
    www.leximation.com

  • Newbie asking about a DeploymentException

    Thank you for reading my question.
    First I apologize as a newbie if this is a common question. Despite my still-limited vocabulary, I have tried to search this forum by the keywords in the exceptions I am getting, but it didn't get me anywhere.
    I have J2EE 1.3.1 and jboss-3.2.1_tomcat-4.1.24. I have successfully compiled, deployed, and run most of the tutorials of the O'Reilly workbook for JBoss (http://www.oreilly.com/catalog/entjbeans3/workbooks/) and am now trying to branch out on my own a bit but not getting far.
    I have simplified so much that I am now only trying to run a copy of the oreilly's first tutorial's CabinBean and its client, except I have renamed CabinBean to ThingBean. (With all source and xml files are changed accordingly).
    When I try to run my client program, the line
    Object ref = jndiContext.lookup("ThingHomeRemote");gives a "javax.naming.NameNotFoundException: ThingHomeRemote not bound".
    After looking into this further, I find that when I (re)deploy my jar or when I restart the jboss process (pieces of the console output is included below my message), it complains about something named "test/TestEntity" in a jarfile named ejb-test.jar, neither of which I know anything about. (My bean is named Thing and is in thing.jar along with its ejb-jar.xml and jboss.xml.)
    Does anyone know what this ejb-test.jar is? Is ejb-test.jar supposed to be there? Is it keeping my Thing bean from deploying, or does it sound like my Thing bean has problems of its own?
    Thanks for any insight,
    /Mel
    Here is copied from the jboss console during a restart (I have replaced parts with "<<myjbossdir>>" which makes it somewhat shorter):
    13:35:48,812 ERROR [URLDeploymentScanner] Failed to deploy: org.jboss.deployment.scanner.URLDeploymentScanner$DeployedURL@a624f2ea{ url=file:/<<myjbossdir>>/server/default/deploy/ejb-test.jar, deployedLastModified=0 }
    org.jboss.deployment.DeploymentException: Error in ejb-jar.xml for Entity Bean test/TestEntity: The ejb-name for a CMP2.x Entity must be a valid Java Identifier
    And a little later it has this snippet:
    Incompletely deployed packages:
    [org.jboss.deployment.DeploymentInfo@a624f2ea { url=file:/<<myjbossdir>>/server/default/deploy/ejb-test.jar }
    deployer: org.jboss.ejb.EJBDeployer@1dfc8a0
    status: Deployment FAILED reason: Error in ejb-jar.xml for Entity Bean test/TestEntity: The ejb-name for a CMP2.x Entity must be a valid Java Identifier
    state: FAILED
    watch: file:/<<myjbossdir>>/server/default/deploy/ejb-test.jar
    lastDeployed: 1057080948546
    lastModified: 1057080948468
    mbeans:
    , org.jboss.deployment.DeploymentInfo@36e9e356 { url=file:/<<myjbossdir>>/server/default/deploy/thing.jar }
    deployer: null
    status: null
    state: INIT_WAITING_DEPLOYER
    watch: file:/<<myjbossdir>>/server/default/deploy/thing.jar
    lastDeployed: 1057080948937
    lastModified: 1057080948921
    mbeans:

    It works, just following the simple first sample provided by O'Reilly. The home lookup lines are Context jndiContext = new InitialContext();  // props from a jndi.properties file
    Object ref = jndiContext.lookup("ThingHomeRemote");
    ThingHomeRemote home = (ThingHomeRemote)PortableRemoteObject.narrow(ref,ThingHomeRemote.class);   and the ejb-jar.xml contains
    <ejb-jar>
    <enterprise-beans>
       <entity>
          <ejb-name>ThingEJB</ejb-name>
          <home>mybeanpackage.ThingHomeRemote</home>
          <remote>mybeanpackage.ThingRemote</remote>
          <ejb-class>mybeanpackage.ThingBean</ejb-class>
    ...I haven't gotten very far yet (obviously), but does JBoss maybe use the classname automatically as the lookup string?

  • How is html page outputed when using taglib and xml ?

    Dear all,
              I am a newbie for taglib and xml. Today, when I read some source code of a
              website, I found that there is a entry like
              "%@ taglib uri="/tlds/taglib.tld" prefix="myprefix" %>",
              and some other entries like
              "<myprefix:Content area="<%=contentArea%>" />"
              I opened the specifized file taglib.tld and saw a tag entry named "Content",
              its tagclass is com.mycom.presentation.taglib.ContentTag. Again I opend a
              java class file "ContentTag.java" and saw some setXXX methods and doXXX
              methods. I donot know how is the webpage outputed. Can someone give me a
              detailed description about that? I will greatly appreciate your help.
              Some source code segments are listed as follows:
              test.jsp:
              <%@ taglib uri="/tlds/taglib.tld" prefix="myprefix" %>
              <td>
              <myprefix:Content body="<%=body%>" area="<%=contentArea%>"
              pageName="<%=pageName%>" />
              </td>
              taglib.tld:
              <?xml version="1.0" encoding="ISO-8859-1" ?>
              <!DOCTYPE taglib
              PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"
              "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
              <tag>
              <name>Content</name>
              <tagclass>com.myprefix.presentation.taglib.ContentTag</tagclass>
              <bodycontent>JSP</bodycontent>
              <info>An tag which given the screen and element does the right content
              thing!</info>
              <attribute>
              <name>id</name>
              <required>false</required>
              <rtexprvalue>true</rtexprvalue>
              <!--type>String</type-->
              </attribute>
              <attribute>
              <name>pageName</name>
              <required>false</required>
              <rtexprvalue>true</rtexprvalue>
              <!--type>String</type-->
              </attribute>
              <attribute>
              <name>area</name>
              <required>false</required>
              <rtexprvalue>true</rtexprvalue>
              <!--type>String</type-->
              </attribute>
              <attribute>
              <name>body</name>
              <required>false</required>
              <rtexprvalue>true</rtexprvalue>
              <!--type>long</type-->
              </attribute>
              </tag>
              ContentTag.java
              package com.mycom.presentation.taglib;
              import javax.servlet.*;
              import javax.servlet.http.*;
              import javax.servlet.jsp.JspTagException;
              import javax.servlet.jsp.tagext.BodyTagSupport;
              public class ContentTag extends BodyTagSupport {
              private String ......;
              public String ......;
              public ContentTag() {
              super();
              public void setPageName(String pageName) {
              this.pageName = pageName;
              public void setArea(String area) {
              this.area = area;
              public void setSegment(String segment) {
              this.segment = segment;
              if (segment!=null) // && !segment.equals("null")
              this.segment_set = true;
              public void setAdmin(String admin) {
              try{
              this.admin = Boolean.getBoolean(admin);
              } catch (Exception _) {
              debugCategory.debug("Setting admin err " + admin);
              public void setBody(String body)
              try {
              this.body = Long.parseLong(body);
              } catch (NumberFormatException ne) {
              debugCategory.debug("Setting body format err");
              public int doStartTag() {
              if (contentMap == null)
              HttpSession session = pageContext.getSession();
              if (segment==null)
              segment =
              (String)session.getAttribute(Parameters.segment_id);
              if (currentScreen==null)
              currentScreen =
              (String)session.getAttribute(Parameters.currentScreen);
              try{
              StateEngineProxy sep =
              (StateEngineProxy)session.getAttribute("stateMachine");
              ModelManager mm =
              (ModelManager)session.getAttribute("modelManager");
              if (sep == null||mm==null)
              sep = new StateEngineProxy();
              session.setAttribute("stateMachine", sep);
              mm = new ModelManager();
              mm.init(session, sep);
              session.setAttribute("modelManager", mm);
              if (body !=0)
              //content = (ContentAI)
              contentMap.get(Parameters.content_id+Long.toString(body));
              if (content==null)
              debugCategory.debug("Get by Body");
              mm.getContent(body);
              content =
              (ContentAI)session.getAttribute(Parameters.content);
              //contentMap.put(Parameters.content_id +
              Long.toString(body), content);
              file:// pageContext.setAttribute(CONTENT_MAP,
              contentMap, myScope);
              if (pageName!=null&&area!=null &&
              segment!=null&&segment!=""&&area!=""&&pageName!="")
              contentList = (Collection)
              mm.getContentBySegmentPageNameAndArea(segment,
              pageName, area);
              if(contentList!=null){
              Iterator it = contentList.iterator();
              if (it.hasNext()) {
              content = (ContentAI)it.next();
              session.setAttribute(Parameters.content,
              content);
              return EVAL_BODY_TAG;
              return EVAL_BODY_TAG;
              public int doEndTag() throws JspTagException {
              current = SUPPLIERSINFORMATION;
              pageContext.getOut().flush();
              if ( content != null
              && !currentScreen.equals(ScreenNames.CONTENT_LIST_URL)
              && !currentScreen.equals(ScreenNames.CONTENT_EDIT_URL))
              if ( !admin ){
              // include body?
              if
              rentScreen.equals(ScreenNames.CONTENT_NEWS_URL)){ 
              pageContext.getOut().println("<h3>" + content.getSubject() + "<br></h3>");
              pageContext.getOut().println("<!-- Subject[" + content.getSubject() + "]");
              pageContext.getOut().println("OrgID[" + content.getOrgId() + "]");
              pageContext.getOut().println("LogoPath[" + content.getLogoPath() + "]");
              pageContext.getOut().println("PageName[" + content.getPageName() + "]");
              pageContext.getOut().println("Area[" + content.getArea() + "]");
              pageContext.getOut().println("Segment[" + content.getSegment() + "]");
              pageContext.getOut().println("<!--Body[-->" + "<br>" + content.getBody() + "<!--]-->");
              return EVAL_PAGE;
              public int doAfterBody() throws JspTagException {
              return SKIP_BODY;
              public static String shortenLink(String link)
              

    Hi Andy,
              The sequence of operations that happen when a JSP page encounters a Custome Tag are
              1. Find the class associated with the custom tag from the tld.
              2. The set and get methods that u find are for passing  the values for the tag attributes that u may need
              to pass.
              3. The Tag Lib class performs the operation specified and flushes the output to the jsp.
              For further understanding ..u can refer to these sites !!!
              http://java.sun.com/products/jsp/tutorial/TagLibrariesTOC.html
              http://www.weblogic.com/docs51/classdocs/API_taglib.html#intro
              Regards,
              Sundhar Subramanian
              Andy Ping wrote:
              > Dear all,
              >
              > I am a newbie for taglib and xml.  Today, when I read some source code of a
              > website, I found that there is a entry like
              >     "%@ taglib uri="/tlds/taglib.tld" prefix="myprefix" %>",
              > and some other entries like
              >     "<myprefix:Content  area="<%=contentArea%>"  />"
              > I opened the specifized file taglib.tld and saw a tag entry named "Content",
              > its tagclass is com.mycom.presentation.taglib.ContentTag.  Again I opend a
              > java class file "ContentTag.java" and saw some setXXX methods and doXXX
              > methods.  I donot know how is the webpage outputed.  Can someone give me a
              > detailed description about that?   I will greatly appreciate your help.
              > Some source code segments are listed as follows:
              >
              > ----------------
              > test.jsp:
              > ----------------
              > ...
              > <%@ taglib uri="/tlds/taglib.tld" prefix="myprefix" %>
              > ...
              > <td>
              >     <myprefix:Content body="<%=body%>" area="<%=contentArea%>"
              > pageName="<%=pageName%>" />
              > </td>
              > ...
              >
              > ----------------
              > taglib.tld:
              > ----------------
              > <?xml version="1.0" encoding="ISO-8859-1" ?>
              > <!DOCTYPE taglib
              >         PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"
              >  "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
              > ......
              >   <tag>
              >     <name>Content</name>
              >     <tagclass>com.myprefix.presentation.taglib.ContentTag</tagclass>
              >     <bodycontent>JSP</bodycontent>
              >     <info>An tag which given the screen and element does the right content
              > thing!</info>
              >     <attribute>
              >       <name>id</name>
              >       <required>false</required>
              >       <rtexprvalue>true</rtexprvalue>
              >       <!--type>String</type-->
              >     </attribute>
              >     <attribute>
              >       <name>pageName</name>
              >       <required>false</required>
              >       <rtexprvalue>true</rtexprvalue>
              >       <!--type>String</type-->
              >     </attribute>
              >     <attribute>
              >       <name>area</name>
              >       <required>false</required>
              >       <rtexprvalue>true</rtexprvalue>
              >       <!--type>String</type-->
              >     </attribute>
              >     <attribute>
              >       <name>body</name>
              >    <required>false</required>
              >    <rtexprvalue>true</rtexprvalue>
              >       <!--type>long</type-->
              >     </attribute>
              >   </tag>
              > ......
              >
              > ----------------
              > ContentTag.java
              > ----------------
              > package com.mycom.presentation.taglib;
              >
              > import javax.servlet.*;
              > import javax.servlet.http.*;
              > import javax.servlet.jsp.JspTagException;
              > import javax.servlet.jsp.tagext.BodyTagSupport;
              > ...
              >
              > public class ContentTag extends  BodyTagSupport {
              >     private String ......;
              >     public String ......;
              >     ......
              >
              >     public ContentTag() {
              >         super();
              >     }
              >
              >     public void setPageName(String pageName) {
              >         this.pageName = pageName;
              >     }
              >
              >     public void setArea(String area) {
              >         this.area = area;
              >     }
              >
              >     public void setSegment(String segment) {
              >         this.segment = segment;
              >         if (segment!=null) // && !segment.equals("null")
              >         {
              >             this.segment_set = true;
              >         }
              >     }
              >
              >     public void setAdmin(String admin) {
              >         try{
              >             this.admin = Boolean.getBoolean(admin);
              >         } catch (Exception _) {
              >             debugCategory.debug("Setting admin err " + admin);
              >         }
              >
              >     }
              >     public void setBody(String body)
              >     {
              >         try {
              >          this.body = Long.parseLong(body);
              >         } catch (NumberFormatException ne) {
              >             debugCategory.debug("Setting body format err");
              >         }
              >     }
              >
              >     public int doStartTag() {
              >             if (contentMap == null)
              >             {
              >             }
              >    HttpSession session = pageContext.getSession();
              >             if (segment==null)
              >             {
              >                 segment =
              > (String)session.getAttribute(Parameters.segment_id);
              >             }
              >             if (currentScreen==null)
              >             {
              >                 currentScreen =
              > (String)session.getAttribute(Parameters.currentScreen);
              >             }
              >             try{
              >                 StateEngineProxy sep =
              >                     (StateEngineProxy)session.getAttribute("stateMachine");
              >                 ModelManager mm =
              > (ModelManager)session.getAttribute("modelManager");
              >                 if (sep == null||mm==null)
              >                 {
              >                     sep = new StateEngineProxy();
              >                     session.setAttribute("stateMachine", sep);
              >                     mm = new ModelManager();
              >                     mm.init(session, sep);
              >
              >                     session.setAttribute("modelManager", mm);
              >                 }
              >                 if (body !=0)
              >                 {
              >                     //content = (ContentAI)
              >                     //
              > contentMap.get(Parameters.content_id+Long.toString(body));
              >                     if (content==null)
              >                     {
              >                     debugCategory.debug("Get by Body");
              >                     mm.getContent(body);
              >                     content =
              > (ContentAI)session.getAttribute(Parameters.content);
              >
              >                     //contentMap.put(Parameters.content_id +
              > Long.toString(body), content);
              >                     file:// pageContext.setAttribute(CONTENT_MAP,
              > contentMap, myScope);
              >                     }
              >                 }
              >                 if (pageName!=null&&area!=null &&
              >                     segment!=null&&segment!=""&&area!=""&&pageName!="")
              >                 {
              >                      contentList = (Collection)
              >                          mm.getContentBySegmentPageNameAndArea(segment,
              > pageName, area);
              >                      if(contentList!=null){
              >                         Iterator it = contentList.iterator();
              >                         if (it.hasNext()) {
              >                             content = (ContentAI)it.next();
              >                             session.setAttribute(Parameters.content,
              > content);
              >                             return EVAL_BODY_TAG;
              >                         }
              >                      }
              >                 }
              >                 ...
              >            }
              >   return EVAL_BODY_TAG;
              >     }
              >
              >     public int doEndTag() throws JspTagException {
              >         current = SUPPLIERSINFORMATION;
              >         pageContext.getOut().flush();
              >         if ( content != null
              >             && !currentScreen.equals(ScreenNames.CONTENT_LIST_URL)
              >             && !currentScreen.equals(ScreenNames.CONTENT_EDIT_URL))
              >         {
              >             if ( !admin  ){
              >             // include body?
              >                 if
              > rentScreen.equals(ScreenNames.CONTENT_NEWS_URL)){
              >                     pageContext.getOut().println("<h3>" + content.getSubject() + "<br></h3>");
              >                 }
              >                 pageContext.getOut().println("<!-- Subject[" + content.getSubject() + "]");
              >                 pageContext.getOut().println("OrgID[" + content.getOrgId() + "]");
              >                 pageContext.getOut().println("LogoPath[" + content.getLogoPath() + "]");
              >                 pageContext.getOut().println("PageName[" + content.getPageName() + "]");
              >                 pageContext.getOut().println("Area[" + content.getArea() + "]");
              >                 pageContext.getOut().println("Segment[" + content.getSegment() + "]");
              >                 pageContext.getOut().println("<!--Body[-->" + "<br>" + content.getBody() + "<!--]-->");
              >             }
              >         }
              >  return EVAL_PAGE;
              >     }
              >
              >     public int doAfterBody() throws JspTagException {
              >         return SKIP_BODY;
              >     }
              >
              >     public static String shortenLink(String link)
              >     {
              >        ...
              >     }
              > }
              

Maybe you are looking for