DW extension to make it first two WORDS bold

dear experts,
I have a db with one column - DESCRIPTION
I would like to have the first two words of this column to be
displayed in
BOLD, how can I do that in DW
I am sure there must be an extension for this
please help
thanks

David Powers wrote:
> Techy wrote:
>> I have a db with one column - DESCRIPTION
>>
>> I would like to have the first two words of this
column to be
>> displayed in
>> BOLD, how can I do that in DW
>
> When asking a question about databases, you should
always say which
> database and which server-side language you are using.
The answer will
> almost always be different for each one.
>
> I very much doubt that anyone has created a Dreamweaver
extension to do
> this. However, it should be relatively easily
accomplished using
> server-side string manipulation functions. Without
knowing what you're
> using, nobody can give you an answer.
>
sure, you can do that with :
- server-side language like(PHP, ASP, JSP, CFM, Ruby, ...)
- javascript
here is javascript function
function setBold(string){
var pos = string.indexOf(" ");
var pos2 = string.indexOf(" ",pos+1);
var first = string.slice(0,pos2).bold();
var last = string.slice(pos2);
document.write(first+" "+last);
setBold("salut c'est moi");
you can do that (properly) with regexp

Similar Messages

  • How do I add a two word phrase to index

    I’m trying to speed up the process of adding Latin names of plants and animals to an index using Indesign CS4. These consist of two word phrases (genus + species) which need to be put into the topic level 1 and topic level 2 boxes of the New Page Reference (Index) dialog. Using Ctrl 7 to invoke the dialog just puts whatever is selected into Topic1 and using Shift+Ctrl+Alt+] adds a ‘proper name’ index entry (Surname, forename) which is no good. When the information has been entered, a simple nested index can be produced, sorted by  genus and then species.
    I’m used to programming using vb in MS Office but am totally new to javascript and this has taken two days to get this far. The first problem is that if the user only puts an insertion point into the first word (genus) I can’t figure out how to move to the second word (species) in order to save it to a variable.
    So I have:
    var myTopic1 = "" ; // topic level 1, i.e. genus
    var myTopic2 = "" ; // topic level 2, i.e. species
    myIP = app.selection[0] ;
    myTopic1 = myIP.words[0].contents ;
    This works on a insertion point in any word, or if a phrase is highlighted will take the first word.
    Is there a simple way of copying the second word after the insertion point to myTopic2? I’ve tried various methods but can’t get anything to work. I thought it would be a simple matter of adding 1 to the index of the containing paragraph or story.
    I’ve got round this in a very long-winded way by asking the user to select the whole genus+species string, then working out the position of the dividing space and reconstructing the genus and species character by character:
    var myString = "" ; // user-selected string: genus + species
    myString = myIP.contents
    myStringlen = myIP.contents.length
    var xposn = myString.indexOf(" "); // gives posn of the (first) space character within selected string
    var yposn = 0 ; // start of the string
    myTopic1 = myString.charAt(yposn) ;
    while (yposn < (xposn-1))
    myTopic1 = myTopic1 + myString.charAt(yposn+1) ;
    yposn++ ;
    while (xposn < myStringlen)
    myTopic2 = myTopic2 + myString.charAt(xposn+1) ;
    xposn++ ;
    // show results:
    alert("Topic1 = " + myTopic1 + ". Topic 2 = " +myTopic2) ;
    So at this point I need to figure how to invoke the New Page Reference dialog with Topic1 and Topic 2 filled in? I would like the option of overriding the character format of the page reference ‘Number Style Override’, so would prefer to conclude the script with the dialog left open. Can this be done using script, or do I need a custom dialog? Alternatively it would also be good to just automatically save Topic1 and Topic2 and insert the index marker at the selection point without invoking any dialogs. I’m really struggling to get anywhere with this, can someone please help! Many thanks. Sorry for the long post.

    John,
    It can be confusing initially, but JavaScript and InDesign's object model will soon make sense. What you want to do can be done with this script:
    w1 = app.selection[0].words[0].contents;
    w2 = app.selection[0].words[1].contents;
    doc = app.activeDocument;
    if (doc.indexes.length == 0){
        doc.indexes.add();
    species = doc.indexes[0].topics.add (w1).topics.add (w2);
    species.pageReferences.add (app.selection[0], PageReferenceType.currentPage);
    Select genus and species, then run the script.
    It's not possible (I don't think) to open the New page Reference dialog. Do you want to apply the number style override to all page references? If that's the case, don't. Apply the character style to the page numbers after the index has been generated, or better, set it in the index paragraph style.
    If you want to apply the number style override only to some pages, you can do as follows. Before selecting genus+species, prefix the genus name with e.g. #. That symbol tells the script to add an override. The script will strip the #, create the page reference, and add the override. You need to tell the script somehow which character style to use for the override.
    Peter
    Edit: Jump beat me to it, and gives you a different method to get your two words. Spoilt for choice!
    P.

  • First two characters erversed! (see what I mean?...)

    On my MacBook Pro listed below I get this funny behavior: I go into a text field, or type in TextEdit (it makes no difference what) and sometimes, the first two characters I type get inverted, i.e. I want to type the word 'word' and, sure enough, I hit the keys in the right order: w-o-r-d, but when I look at my screen, I've managed to type 'owrd'. 'w' and 'o' have been entered into the buffer in the opposite order to what I typed.
    And yes, I've been observing this over a number of days prior to my posting. I touch type, and I'm very accurate. The problem doesn't manifest itself with other machines.
    Anyone else has observed something like it?
    Many thanks, as always.

    Hi Carolyn, thanks for the reply.
    I mustn't have put it clearly in the original post: it makes no difference if I'm editing text in TextEdit or another app. I've had the issue with pretty much every text-capable app in OS X.
    Unless, of course, I'm losing it, and I'm actually entering the characters in the wrong order. But I don't think so.
    Still, it's a peculiar issue to pin down, as it's definitely very hard to replicate. I mean, how do you 'replicate' potentially making a mistake?
    Here's a funny instance of it, from just earlier tonight (it's nearly midnight here in Greece):
    I was in Finder and wanted to quickly open a new Finder window to see how much free space I've got on the hard disk (at the bottom of the Finder window) and CMD-Tab to Safari and look at a page I had loaded. So the key sequence was: CMD-N, CMD-Tab. What I got was the opposite: OS X first switched over to Safari, and duly opened a new, blank Safari window instead.
    I had definitely pressed CMD-N before pressing CMD-N.

  • Regular Expression - Select two words after specific string

    Hi,
    I am trying to select the two words/strings after the first word "door". I am using the search pattern (?<=door).\w+ but in this case I get the complete text after the word "door". I only want to select the two words after the first "door" in the complete text.
    Can anybody help me?
    Thanks!
    Marco Snels

    Hi Marco,
    I'm relatively handy with RegEx but this seems like a problem where I would employ a little bit of RegEx and CTL, just to make life easier.
    You can use the following RegEx (note: I didn't test this in Integrator, only in a RegEx testing tool) to extract the two words after door (but including door, unfortunately):
    (?:door)[\s]\w+[\s]\w+
    This would give you something like the following in your extracted field:
    door is brown
    You could then pass through a re-formatter to remove "door" and the whitespace and be on your way. Not the best answer but should perform reasonably well and get you up and going.
    Regards,
    Patrick Rafferty
    http://branchbird.com

  • Count first two columns

    Hello,
    I have a count requirement that i havent been able to solve by searching sdn.  Maybe someone can help.
    I have a query built on a multiprovider that points to two basic cubes.  The basic cubes do not contain a count key figure.  The first two columns of my query are characteristics.  My requirement is to count the occurences of the combination of the first two column (characteristics).  I am looking for a way to do this in the query so i do not have to reload the cubes as they have large volumes of data.  All the suggestions i have been able to find on sdn seem to be only for counting a single characteristic.  Is there a way to count the combination of two?
    Regards,
    TMS

    Hi Create a count using the formula or calculated ket figure for the count unique id like client id for your infocube.
    so you will have a count for each row now. place this count object in your column.
    now select the two char or the group whatever you want a count in your row.
    select query properties and select the display tab and make sure the option - hide repeated key values is selected (normally by default it is selected). Then select each of the char in rows and in free char and set the option under display tab result rows - always suppress.
    Execute the query now. you will get the list of char and their count. sort the count by descending to get the most duplicate entries by their highest number on top in the count coulmn.
    you can also ignore the rows which donot have a duplicate i.e count more than 1 by creating a new condintion on the count key figure > 1 and restricting the condition  by only the group of char you have given in the column. so that you can also do a drill down by free char in your query and it will only show the duplicates group.
    Hope it helps.
    regards,
    Siva

  • How to skip first TWO Lines of   .txt  file    using XSLT Mapping

    Hi Friends  ,
                              I have an .txt file in has the format as
                               <TEST>
                                4564564545
                                56456444566
                                56465
                                    How can i skip the first two Lines when i am writing the XSLT Mapping ?
                              That <TEST> and empty line shouldn't go the rfc  .
                             How can i skip and sent to rfc  using XSLT Mapping ?
    Best Regards .,
    V.Rangarajan

    you can avoid the empty lines in your File Content Conversion by defining offset.
    <i>Under Document Offset, specify the number of lines that are to be ignored at the beginning of the document.
    This enables you to skip comment lines or column names during processing. If you do not make an entry, the default value is zero lines.</i>
    ref: http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm
    then the generated XML after FCC will not have the empty lines.

  • I have lost first two lines of tool bar, how do I retrieve?

    I inadvertently deleted the first two lines of the tool bar. I have no file, edit, view, bookmarks, tools, etc. I have no way to go to the previous page or to the next page. I don't know how I deleted these important tools. Please help!

    '''<u>Menu Bar</u>''' (File, Edit, View, History, Bookmarks, Tools, Help)<br /> Firefox 3.6.x versions allow the user to hide the Menu Bar.<br />
    *Tap the ALT key or the F10 key, Menu Bar will display, click View, click Toolbars, click Menu Bar to place a check mark next to it, '''''OR'''''
    *Press and hold the ALT key while pressing the letters VTM on your keyboard, then release the ALT key
    *See: http://support.mozilla.com/en-US/kb/Menu+bar+is+missing
    '''<u>Other Toolbars</u>''', see: https://support.mozilla.com/en-US/kb/Back+and+forward+or+other+toolbar+items+are+missing<br />
    '''<u>Status Bar</u>''': click View, click Status Bar to place a check mark<br />
    '''<u>Full Screen Mode</u>''': If you have no Toolbars or Tab Bar: Press F11 (F11 is an on/off toggle). See: http://kb.mozillazin'''e.org/Netbooks#Full_screen<br />
    Also see: http://kb.mozillazine.org/Toolbar_customization_-_Firefox#Restoring_missing_menu_or_other_toolbars
    '''Other issues that need your attention''''''
    The information submitted with your question indicates that you have out of date plugins with known security and stability issues that should be updated. To see the plugins submitted with your question, click "More system details..." to the right of your original question post. You can also see your plugins from the Firefox menu, Tools > Add-ons > Plugins.
    *Adobe Shockwave for Director Netscape plug-in, version 11.5.9.615
    **'''''Security update version 11.5.9.620 released 2011-02-08'''''
    *Adobe PDF Plug-In For Firefox and Netscape 10.0.0
    **'''''Security update version 10.0.1 released 2011-02-08'''''
    *Next Generation Java Plug-in 1.6.0_22 for Mozilla browsers
    **2 updates behind
    **'''''Security update version 1.6.0_24 released 2011-02-10'''''
    #'''Check your plugin versions''': http://www.mozilla.com/en-US/plugincheck/
    #*'''Note: plugin check page does not have information on all plugin versions'''
    #'''Update Shockwave for Director'''
    #*NOTE: this is not the same as Shockwave Flash; this installs the Shockwave Player.
    #*Use Firefox to download and SAVE the installer to your hard drive from the link in the article below (Desktop is a good place so you can find it).
    #*When the download is complete, exit Firefox (File > Exit)
    #*locate and double-click in the installer you just downloaded, let the install complete.
    #*Restart Firefox and check your plugins again.
    #*'''<u>Download link and more information</u>''': http://support.mozilla.com/en-US/kb/Using+the+Shockwave+plugin+with+Firefox
    #'''Update Adobe Reader (PDF plugin):'''
    #*From within your existing Adobe Reader ('''<u>if you have it already installed</u>'''):
    #**Open the Adobe Reader program from your Programs list
    #**Click Help > Check for Updates
    #**Follow the prompts for updating
    #**If this method works for you, skip the "Download complete installer" section below and proceed to "After the installation" below
    #*Download complete installer ('''if you do <u>NOT</u> have Adobe Reader installed'''):
    #**Use the links below to avoid getting the troublesome "getplus" Adobe Download Manager and other "extras" you may not want
    #**Use Firefox to download and SAVE the installer to your hard drive from the appropriate link below
    #**Click "Save to File"; save to your Desktop (so you can find it)
    #**After download completes, close Firefox
    #**Click the installer you just downloaded and allow the install to continue
    #***Note: Vista and Win7 users may need to right-click the installer and choose "Run as Administrator"
    #**'''<u>Download link</u>''': ftp://ftp.adobe.com/pub/adobe/reader/
    #***Choose your OS
    #***Choose the latest #.x version (example 9.x, for version 9)
    #***Choose the highest number version listed
    #****NOTE: 10.x is the new Adobe Reader X (Windows and Mac only as of this posting)
    #***Choose your language
    #***Download the file, SAVE it to your hard drive, when complete, close Firefox, click on the installer you just downloaded and let it install.
    #***Windows: choose the .exe file; Mac: choose the .dmg file
    #*Using either of the links below will force you to install the "getPlus" Adobe Download Manager. Also be sure to uncheck the McAfee Scanner if you do not want the link forcibly installed on your desktop
    #**''<u>Also see Download link</u>''': http://get.adobe.com/reader/otherversions/
    #**Also see: https://support.mozilla.com/en-US/kb/Using+the+Adobe+Reader+plugin+with+Firefox (do not use the link on this page for downloading; you may get the troublesome "getplus" Adobe Download Manager (Adobe DLM) and other "extras")
    #*After the installation, start Firefox and check your version again.
    #'''Update the [[Java]] plugin''' to the latest version.
    #*Download site: http://www.oracle.com/technetwork/java/javase/downloads/index.html (Java Platform: Download JRE)
    #*Also see "Manual Update" in this article to update from the Java Control Panel in Windows Control Panel: http://support.mozilla.com/en-US/kb/Using+the+Java+plugin+with+Firefox#Updates
    #* Removing old versions (if needed): http://www.java.com/en/download/faq/remove_olderversions.xml
    #* Remove multiple Java Console extensions (if needed): http://kb.mozillazine.org
    #*Java Test: http://www.java.com/en/download/help/testvm.xml

  • First two lines of each page... - Format Issue

    I have a manual I am currently updating.  I am unaware of how it was formatted initially but it is currently pushing the first two lines of each page all the way to the left margin.  I have checked everything I know to check for the format setting
    and have been unable to find anything out of the ordinary.  Anyone have any idea what causes this?
    I am using Word 2010

    It may be possibly due to the indentation setting of your document.
    To change it, choose the below option in your word file
    Home => Paragraph => Indents and Spacing => Indentation => Left (0 pi)
    Try if this work outs.

  • Downloads do not appear all (only the first two) in the download statusbar (could be a ff19 or downloadhelper or unmht problem)

    downloads do not appear all (only the first two) in the download statusbar (could be a ff19 or downloadhelper or unmht problem) and none in the download window
    used ff19
    with
    Download Statusbar v0.9.10 by Devon Jensen
    UnMHT v6.2.0 by http://www.unmht.org
    DownloadHelper v4.9.14
    had to revert to ff18.0.2

    Make sure that you do not run Firefox in (permanent) Private Browsing mode.
    *https://support.mozilla.org/kb/Private+Browsing
    *Tools > Options > Privacy: Use custom settings for history
    *Deselect: [ ] "Always use private browsing mode"
    Did you try to disable other extensions?
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • I am using Acrobat Reader 11.0.10 . I cant print mixed originals and also I cannot print letter size correctly . printing of first two pages ok but the rest gets cut off at the top

    How can I print from MAC with Acrobat Reader. I can't seem to get it to print correctly , first two pages of letter size works ok after the remaining pages get moved up and the printing is cut off.

    I arrived here looking for a solution!  And while reading your post the penny dropped that I didn't have a serious problem.  I have a booklet of 112 pages and all I needed to do was re-order the pages as printed so that 1 is followed by a sheet with 2 on the under-face but same side and so on.  The pages had printed back to front and needed flipping.  But then I have a duplex printer and maybe that makes a difference.  Is it to do with your manual duplexing and the order that the second pass is presented to the printer.  As my duplex sheets effectively needed flipping over each one I'm wondering if you can solve your problem with a little experimentation and re-ordering before your second pass.

  • Firefox not closing the first two tabs... Is there a solution ?

    Since this morning I'm not able to quit the first two tabs in firefox...
    It close the page but display an empty tab instead.
    Here's a screenshot : http://i.imgur.com/yGAP7Hn.gif
    Anyone experiencing the same issue ?
    Is there any solutions (in about:config maybe ?)
    Thanks

    You can still be easily block cookies in the current Firefox releases, either via a cookie block exception or by disabling cookies globally or via an extension that blocks content or cookies.
    To see all History and Cookie settings, choose:
    *Tools > Options > Privacy > Firefox will: "Use custom settings for history"
    You can inspect and manage permissions for the domain in the currently selected tab via these steps:
    *Click the "[[Site Identity Button|Site Identity Button]]" (globe/padlock) on the location/address bar
    *Click "More Information" to open "Tools > Page Info" with the Security tab selected
    *Go to the Permissions tab (Tools > Page Info > Permissions) to check the permissions for the domain in the currently selected tab
    *http://kb.mozillazine.org/Cookies
    *https://support.mozilla.org/kb/Deleting+cookies

  • What does having to make these same two hue/saturation adjustments mean?

    I keep having to make the same two yellow adjustments in Lightroom. No matter the subject matter, indoor or outdoor. And no matter the camera body. See the before and after screenshots:
    Before: The puppy coats are too yellow (to me), even after eyedroppering the color card. The puppy whites look correct:
    After: Yellow Hue -30 -- Yellow Saturation -20.   --The puppy coats now appear correct.to me (the puppy whites are still correct). You can also see what happens to the yellow on the color card --it looks less yellow!?  --I find myself doing this adjustment on at least 80% of all my photos. Probably the only reason I dont do it is when there is no yellow in the shot.
    This is in Lightroom V4.3.  This was taken with a Nikon D4, two reflected strobes set up on either side, and with room lighting on, but none of that seems to matter.  I have several other cameras, and light source does not seem to be a factor --once I eyedropper the card everything looks good except the yellows.  The monitor/computer does not seem to matter either.  I see the same problem on both my desktop monitors and laptop, which are calibrated the same (to 6500k=white).  I have ruled out room lighting reflection because this occurs with outdoor shots, and in either case after setting white balance either with a card or an expodisc.
    I don't know enough about this subject to say it might be my aging eyes, but I am running out of other things to consider.
    That is why I posted this. I guess the first question is can anyone else see what I'm talking about?  If not, that would implicate my eyes.  Why do I have to see incorrect yellow on the the card in order to see correct (in this case) coat colors?    If anyone has any ideas, thanks in advance!

    trshaner wrote:
    Post some small sRGB profile JPEGs (1200 x 800) here with the LR adjustments you think look best. This is what your clients will see, correct?
    Here are a few random examples:  Either they've been used, or they are examples of what the exhibitors/publications will like.
    This one seems really close to the accuracy I try for (with varying success).
    Here is the "yellow problem" which I didn't even try to fix because it sorta worked with the cloudy day shot,
    This shows the reason for cranking the highlights down and the shadows up --to get detail out of both coat colors (which shows off the dogs muscle structure)  This is the most extreme example, a black and white dog on a bright sunny day.
    Indoor events have to be available light, upper limit is set to ISO 6400, The lighting can be next to impossible to fix so these are probably not good examples of what you were asking for. Every shot in a 9fps sequence can have a slightly different color even if the house lights look even. I think these are slightly blueish and cannot seem to fix them any better without diminishing returns elsewhere.
    1/800 ISO6400 If it's too grainy for hair detail I try to get at least some shadow definition in the black coat.
    This one looks either a bit too saturated or about right depending on what screen I see it on.
    trshaner wrote:
    The yellow adjustment issue with your ColorChecker Passport profiles indicates a problem, since you don't see this with Adobe and Camera Standard profiles. Are you rechecking the White Balance using a ColorChecker image's grayscale patches when you switch to Adobe Standard and other profiles? I use a Develop preset for each of the LR provided camera profiles containing only White Balance and Calibration (i.e. camera profile). The white balance is slightly different from the settings required for the ColorChecker Passport profile, but the same for all of the LR provided profiles (Adobe Standard, Camera Standard, etc.).
    Example White Balance Canon 600D:
    Profile                                Temp Tint
    ColorChecker Passport  5550   +23
    Adobe Standard, etc.     5600   +10
    Yes, when I check the white balance the whites look good but the yellow persists.  I misspoke earlier --I do see the yellow problem on the standard camera profiles, just not nearly as much.  The other thing I've noticed is that the xrite profiles look too saturated next to the standards. I often have to lower the saturation, or the just the orange saturation (for the dogs).  I cant help but think that is somehow connected to the yellow issue.

  • I recently switched from years of PC to iMac ( OSX 10.7.5) and need to batch convert thousands of old WordPerfect files (many without an apparent file extension) into my new Microsoft 2011 Word.  I am a computer nitwit and am hoping for some simple sol'n.

    I recently switched from years of PC to iMac ( OSX 10.7.5) and need to batch convert thousands of old WordPerfect files (many without an apparent file extension) into my new Microsoft 2011 Word.  I am a computer nitwit and am hoping for some simple solution.

    Try reindexing the mailbox. This can take awhile if you have a lot of mail.
    Reindex messages.
    If that doesn't work try deleting MessageUidsAlreadyDownloaded3.
    Quit the application.
    You need to look in your user Library. Either hold down the option key while using the Finder “Go To Folder” command and select your user Library in your home folder or use the Finder “Go To Folder” command and enter ~/Library/Mail/V2/Mail Data/MessageUidsAlreadyDownloaded3.  Move the file to your desktop.
    Open the application and test. If it works okay, delete the file from the desktop.
    If the application is the same, return thefile to where you got it from, overwriting the newer ones.
    If you prefer to make your User library permanently visible, use the Terminal command found below.
    Show User Library
    You might want to bookmark the command. I had to use it again after I installed 10.8.5. I have also been informed that if you drag the user library to Finder it will remain visible.

  • I can not make document over two times

    Hello.
    When I use the code generated by xmlclassgen_v1_0_0_2, I can not
    make document over two times in same class. I modified sample
    code(TestWidl.java) that I got from OTN
    (xmlclassgen_v1_0_0_2.zip) to check this problem. I modified it
    like below. The only modification is that I made XML data two
    times. The first call was success, but the second call was
    failed. The result of my test program was below:
    How can I avoid this error? Would you please help me?
    *** Result ****
    <
    ?xml version = '1.0' encoding = 'ASCII'?>
    <!DOCTYPE WIDL SYSTEM
    "file:/D:/usrs/ikeda/java/myprojects/XML_test1/WIDL_dtd.txt">
    <WIDL NAME="WIDL1" VERSION="1.0">
    <SERVICE NAME="Service1" URL="Service_URL" INPUT="File"
    OUTPUT="File"/>
    <BINDING NAME="Binding1" TYPE="Input">
    <REGION NAME="Region1" START="Start" EN
    D="End"/>
    <VARIABLE NAME="Variable1" NULLOK="False" TYPE="String"
    USAGE="Internal" VALUE="value"/>
    <CONDITION REF="CRef1" MATCH="CMatch1" SERVICE="Ser
    vice1" TYPE="Success"/>
    <VARIABLE NAME="Variable2" NULLOK="True" TYPE="String1"
    USAGE="Header"/>
    </BINDING>
    <BINDING NAME="Binding2" TYPE="Output">
    <CONDITION REF="CRef2" MATCH="CMatch2" TYPE="Retry"/>
    <VARIABLE NAME="Variable3" NULLOK="False" TYPE="String2"
    USAGE="Function" MASK="mask"/>
    </BIN
    DING>
    </WIDL>
    oracle.xml.parser.XMLDOMException: Node doesn't belong to the
    current document
    oracle.xml.parser.XMLDOMException: Node doesn't belong to the
    current document
    at oracle.xml.parser.XMLNode.checkDocument(Compiled
    Code)
    at oracle.xml.parser.XMLNode.appendChild(Compiled Code)
    at oracle.xml.parser.XMLDocument.appendChild(Compiled
    Code)
    at oracle.xml.parser.XMLNode.appendChild(Compiled Code)
    at oracle.xml.classgen.CGDocument.<init>(Compiled Code)
    at XML_test1.WIDL.<init>(Compiled Code)
    at XML_test1.TestWidl.test(Compiled Code)
    at XML_test1.TestWidl.main(TestWidl.java:11)
    The sample code that I modified was below:
    import oracle.xml.classgen.*;
    import oracle.xml.parser.*;
    public class TestWidl
    public static void main (String args[])
    test(); // I modified
    test(); //I modified
    static void test(){
    try
    WIDL w1 = new WIDL();
    DTD dtd = w1.getDTDNode();
    w1.setNAME("WIDL1");
    w1.setVERSION(WIDL.VERSION_1_0);
    SERVICE s1 = new SERVICE("Service1", "Service_URL");
    s1.setINPUT("File");
    s1.setOUTPUT("File");
    BINDING b1 = new BINDING("Binding1");
    b1.setTYPE(BINDING.TYPE_INPUT);
    BINDING b2 = new BINDING("Binding2");
    b2.setTYPE(BINDING.TYPE_OUTPUT);
    VARIABLE v1 = new VARIABLE("Variable1",
    VARIABLE.NULLOK_FALSE);
    v1.setTYPE(VARIABLE.TYPE_STRING);
    v1.setUSAGE(VARIABLE.USAGE_INTERNAL);
    v1.setVALUE("value");
    VARIABLE v2 = new VARIABLE("Variable2",
    VARIABLE.NULLOK_TRUE);
    v2.setTYPE(VARIABLE.TYPE_STRING1);
    v2.setUSAGE(VARIABLE.USAGE_HEADER);
    VARIABLE v3 = new VARIABLE("Variable3",
    VARIABLE.NULLOK_FALSE);
    v3.setTYPE(VARIABLE.TYPE_STRING2);
    v3.setUSAGE(VARIABLE.USAGE_FUNCTION);
    v3.setMASK("mask");
    CONDITION c1 = new CONDITION("CRef1", "CMatch1");
    c1.setSERVICE("Service1");
    c1.setTYPE(CONDITION.TYPE_SUCCESS);
    CONDITION c2 = new CONDITION("CRef2", "CMatch2");
    c2.setTYPE(CONDITION.TYPE_RETRY);
    CONDITION c3 = new CONDITION("CRef3", "CMatch3");
    c3.setSERVICE("Service3");
    c3.setTYPE(CONDITION.TYPE_FAILURE);
    REGION r1 = new REGION("Region1", "Start", "End");
    b1.addNode(r1);
    b1.addNode(v1);
    b1.addNode(c1);
    b1.addNode(v2);
    b2.addNode(c2);
    b2.addNode(v3);
    w1.addNode(s1);
    w1.addNode(b1);
    w1.addNode(b2);
    //w1.validateContent();
    w1.print(System.out);
    catch (Exception e)
    System.out.println(e.toString());
    e.printStackTrace();
    null

    Satoshi Ikeda (guest) wrote:
    : Hello.
    : When I use the code generated by xmlclassgen_v1_0_0_2, I can
    not
    : make document over two times in same class. I modified sample
    : code(TestWidl.java) that I got from OTN
    : (xmlclassgen_v1_0_0_2.zip) to check this problem. I modified
    it
    : like below. The only modification is that I made XML data two
    : times. The first call was success, but the second call was
    : failed. The result of my test program was below:
    : How can I avoid this error? Would you please help me?
    : *** Result ****
    : <
    : ?xml version = '1.0' encoding = 'ASCII'?>
    : <!DOCTYPE WIDL SYSTEM
    : "file:/D:/usrs/ikeda/java/myprojects/XML_test1/WIDL_dtd.txt">
    : <WIDL NAME="WIDL1" VERSION="1.0">
    : <SERVICE NAME="Service1" URL="Service_URL" INPUT="File"
    : OUTPUT="File"/>
    : <BINDING NAME="Binding1" TYPE="Input">
    : <REGION NAME="Region1" START="Start" EN
    : D="End"/>
    : <VARIABLE NAME="Variable1" NULLOK="False" TYPE="String"
    : USAGE="Internal" VALUE="value"/>
    : <CONDITION REF="CRef1" MATCH="CMatch1" SERVICE="Ser
    : vice1" TYPE="Success"/>
    : <VARIABLE NAME="Variable2" NULLOK="True" TYPE="String1"
    : USAGE="Header"/>
    : </BINDING>
    : <BINDING NAME="Binding2" TYPE="Output">
    : <CONDITION REF="CRef2" MATCH="CMatch2" TYPE="Retry"/>
    : <VARIABLE NAME="Variable3" NULLOK="False" TYPE="String2"
    : USAGE="Function" MASK="mask"/>
    : </BIN
    : DING>
    : </WIDL>
    : oracle.xml.parser.XMLDOMException: Node doesn't belong to the
    : current document
    : oracle.xml.parser.XMLDOMException: Node doesn't belong to the
    : current document
    : at oracle.xml.parser.XMLNode.checkDocument(Compiled
    : Code)
    : at oracle.xml.parser.XMLNode.appendChild(Compiled Code)
    : at oracle.xml.parser.XMLDocument.appendChild(Compiled
    : Code)
    : at oracle.xml.parser.XMLNode.appendChild(Compiled Code)
    : at oracle.xml.classgen.CGDocument.<init>(Compiled Code)
    : at XML_test1.WIDL.<init>(Compiled Code)
    : at XML_test1.TestWidl.test(Compiled Code)
    : at XML_test1.TestWidl.main(TestWidl.java:11)
    : The sample code that I modified was below:
    : import oracle.xml.classgen.*;
    : import oracle.xml.parser.*;
    : public class TestWidl
    : public static void main (String args[])
    : test(); // I modified
    : test(); //I modified
    : static void test(){
    : try
    : WIDL w1 = new WIDL();
    : DTD dtd = w1.getDTDNode();
    : w1.setNAME("WIDL1");
    : w1.setVERSION(WIDL.VERSION_1_0);
    : SERVICE s1 = new SERVICE("Service1", "Service_URL");
    : s1.setINPUT("File");
    : s1.setOUTPUT("File");
    : BINDING b1 = new BINDING("Binding1");
    : b1.setTYPE(BINDING.TYPE_INPUT);
    : BINDING b2 = new BINDING("Binding2");
    : b2.setTYPE(BINDING.TYPE_OUTPUT);
    : VARIABLE v1 = new VARIABLE("Variable1",
    : VARIABLE.NULLOK_FALSE);
    : v1.setTYPE(VARIABLE.TYPE_STRING);
    : v1.setUSAGE(VARIABLE.USAGE_INTERNAL);
    : v1.setVALUE("value");
    : VARIABLE v2 = new VARIABLE("Variable2",
    : VARIABLE.NULLOK_TRUE);
    : v2.setTYPE(VARIABLE.TYPE_STRING1);
    : v2.setUSAGE(VARIABLE.USAGE_HEADER);
    : VARIABLE v3 = new VARIABLE("Variable3",
    : VARIABLE.NULLOK_FALSE);
    : v3.setTYPE(VARIABLE.TYPE_STRING2);
    : v3.setUSAGE(VARIABLE.USAGE_FUNCTION);
    : v3.setMASK("mask");
    : CONDITION c1 = new CONDITION("CRef1", "CMatch1");
    : c1.setSERVICE("Service1");
    : c1.setTYPE(CONDITION.TYPE_SUCCESS);
    : CONDITION c2 = new CONDITION("CRef2", "CMatch2");
    : c2.setTYPE(CONDITION.TYPE_RETRY);
    : CONDITION c3 = new CONDITION("CRef3", "CMatch3");
    : c3.setSERVICE("Service3");
    : c3.setTYPE(CONDITION.TYPE_FAILURE);
    : REGION r1 = new REGION("Region1", "Start", "End");
    : b1.addNode(r1);
    : b1.addNode(v1);
    : b1.addNode(c1);
    : b1.addNode(v2);
    : b2.addNode(c2);
    : b2.addNode(v3);
    : w1.addNode(s1);
    : w1.addNode(b1);
    : w1.addNode(b2);
    : //w1.validateContent();
    : w1.print(System.out);
    : catch (Exception e)
    : System.out.println(e.toString());
    : e.printStackTrace();
    Move
    WIDL w1 = new WIDL();
    out of test() and modify it as
    public class TestWidl
    static WIDL w1 = new WIDL(); ...
    and this will work.
    Oracle XML Team
    http://technet.oracle.com
    Oracle Technology Network
    null

  • Why does Final Cut Pro change my title's baseline after the first two titles when exporting a master file?

    Hey Guys,
    I want to use a Zoom title (Titles -> Build In/Out -> Zoom).  I only want the title, not a subtitle.  So I insert Zoom's everywhere, type in my stuff for Line 1, delete the contents of Line 2, format it (font, tracking, etc.).  Everything looks great in the Viewer.  I let it render, then export a Master – same as source.  I open the MOV, the first two titles are great.  Then every title thereafter looks like someone changed the position by 100 pixels south of its original location.
    Here's what I've done to troubleshoot it:
    Removed all Zoom's, inserted new ones, removed the contents of Line 2 and left Line 1 alone (i.e. it still reads "Title").  When I export, everything's fine.  The moment I change formatting or put in new copy in Line 1, same thing happens – every title changes position by 100 pixels down.
    Downloaded Digital Rebellion's Preference Manager, trashed pref's/
    I'm using a TTF with a bold type body only.  Figured I'd leave it at Gill Sans Bold.  Same thing happens as soon as I type something custom into Line 1.
    I had a text style saved and removed it.  (Which wasn't easy.  Solution here.)
    Has this ever happened to you?
    Thanks!

    Hey Jim,
    Thanks for the follow-up.  Here are some more details:
    OS - 10.8.2
    FCP X - 10.0.7
    I can't update either of these because of my Avid installation.
    Something else I didn't mention – this happens in a 4K project.  Notice how a default Zoom title looks:
    Lines 1 and 2 are almost stacked on top of each other.
    Here's my title style:
    Here's what the title looks after I apply the title style, modify Line 1, and remove the contents of Line 2:
    And here's how it looks in the exported master file MOV:
    Notice how it's pushed down?
    Then I decided to make a 720p project.  No more title problems.
    So if you have some 4K footage, Jim, give it a go.  Or if there's another 4K-er out there, try this and let me know.
    Thanks!

Maybe you are looking for