CS4- JS : How to change the DTD Option - Reg.

Dear All,
I'm struggle to not getting the answer for change the DTD options though Script.
Here I can Load the DTD using script and Validate then Its showing so many Errors, It means the root element is wrong [DOCTYPE] so the way I can change as per the XML Root Element.
Root Element : Chapter
Load DTD -> DOCTYPE name is  : text
//================ Start Coding =================================//
app.doScript(File("D:/program files/Adobe InDesign CS4/Scripts/XML Rules/glue code.jsx"));
var myDoc = app.documents.item(0);
var Store = new  Array();
var count=0;
myDTDPath = "C:\\Program Files\\Adobe\\Adobe InDesign CS4\\Executables\\Parser\\Macmil.dtd";
myDoc.importDtd(File(myDTDPath));
main();
function main()
  if (app.documents.length != 0)
    var myDocument = app.documents.item(0);
    //This rule set contains a single rule.
    var DTDTitle  = new Array (new DTDRootTitle);
   with(myDocument)
     var elements = xmlElements;
     __processRuleSet(elements.item(0), DTDTitle);
  else
    alert("No open document");
  //Adds a return character at the end of every XML element.
    function DTDRootTitle()
      this.name = "DTDValidation";
      //XPath will match on every XML element in the XML structure.
      this.xpath = "//chapter";
      // Define the apply function.
       this.apply = function(elm, myRuleProcessor)
            with(elm)
               Store[count] = elm.validate();
               count+=1;
          return true;// Succeeded
        } //End of apply function
   for(var k=0; k<Store.length; k++)
        var test = Store[k];
         for(var m=0; m<test.length; m++)
          if(test[m].isValid == true)
          $.writeln(test[m].element.markupTag.name);
          $.writeln(test[m].errorMessage);
//========================== End of the coding ==========================//
Question : 1
Manually I can load the DTD & change the DTD Options as per the Root Element of the XML.
After Validate using Root Element Itself, Its working fine. Zero Errors.
Mean while I can Load DTD though Script but I can't change the DTD Options, through Script.
So Please any one can give me the solution for change the DTD Options using script.
Please any one can give the solution, Really I can appriciate for this...
Hope I'm waiting the result for this query....
Thanks & Regards
T.R.Hairhara Sudhan

hello  T.R.Hairhara Sudhan
i don't know whether this is write answer or not .
do one thing from active doc get reference of Dtd and from dtd set rootTag = "root tag"
e.g
var dtd =  app.activeDocument.dtds[0];
dtd.rootTag = xmlElement.markupTag;
here xmlElement is value for "Validate from" in DTD option
Regards
tahir1987.

Similar Messages

  • How to change the select-options fields length to long

    Dear friends:
       I had develop a program for sent email,and it have a field for fill mail address as below:
       data: lmail like adr6-smtp_addr.
       select-options: mailadd for lmail no intervals.
       my customer complain that the field is too short,but I can not change it to longer,the select-options component limit the visible length , how can i do for this problem!

    Dear All:
      I had realized this function.
      I defined a parameter and a pushbutton to replace the select-option componet,
    the code share as below.
    data: lmail like adr6-smtp_addr.
    SELECTION-SCREEN BEGIN OF LINE.
    parameters: mailCopy like lmail.
    selection-screen:pushbutton 64(5) pubu user-command mailButt.
    SELECTION-SCREEN END OF LINE.
    select-options: mailadd for lmail NO INTERVALS no-display.
    at selection-screen output.
      CLEAR l_count.
      DESCRIBE TABLE mailadd LINES l_count.
      IF l_count > 1.
        write ICON_DISPLAY_MORE as icon to pubu.
      ELSE.
        write ICON_ENTER_MORE  as icon to pubu.
      ENDIF.
    at selection-screen.
      CLEAR l_count.
      DESCRIBE TABLE mailadd LINES l_count.
      IF NOT mailCopy IS INITIAL AND mailadd[] IS INITIAL.
        MailAdd-low = mailCopy.
        Append mailadd.
      ENDIF.
      IF l_count = 1 and mailCopy IS INITIAL.
        refresh mailadd.
        clear mailadd.
      endif.
      if sy-ucomm = 'MAILBUTT'.
        perform show_box.
      endif.
    *       FORM show_box                                                 *
    FORM show_box.
      TYPE-POOLS aqadh .
      DATA: tab_and_field TYPE  rstabfield.
      tab_and_field-tablename = 'ADR6'.
      tab_and_field-fieldname = 'SMTP_ADDR'.
      CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'
           EXPORTING
                TEXT           = 'SET E-Mail To '
                tab_and_field  = tab_and_field
           TABLES
                range          = MAILADD
           EXCEPTIONS
                no_range_tab   = 1
                cancelled      = 2
                internal_error = 3
                OTHERS         = 4.
      IF NOT MAILADD[] IS INITIAL.
        READ TABLE MAILADD INDEX 1.
        MAILCopy = MAILADD-LOW.
      ELSE.
        CLEAR MAILCopy.
      ENDIF.
    ENDFORM.

  • How to change the select options selection text dynamically in webdynpro abap ?

    I am using standard interface WDR_SELECT_OPTIONS.... i want to change the Selection text dynamically in my select options.I.E. if the select option is for VBELN field than i want to change its description SALES ORDER Number through Code to some other text.
    If anyone can please help me in this.

    Hi,
    You can achieve your requirement as below
    Get the range table of your selection field as below
              data lt_range_table type ref to data.
              wd_this->m_handler->GET_RANGE_TABLE_OF_SEL_FIELD(
                        exporting
                        i_id = 'VBELN'
                        receiving
                        rt_range_table = lt_range_table ).
    Update the selection field with new description - 'Your New Text'
              wd_this->m_handler->UPD_SELECTION_FIELD(
                        exporting
                             I_ID = 'VBELN'
                             I_DESCRIPTION = 'Your New text'
                             I_IS_AUTO_DESCRIPTION = abap_false
                             IT_RESULT = lt_range_table ).
    You can also pass the other parameters as per your requirement
    Hope this helps you.
    Regards,
    Rama

  • How to changed the download  options?

    When I tried to download from internet or files they send me it automatically opens with itunes. How can I change this?

    I'll assume for a moment that you're using Safari to download.
    Click on the word Safari in the menu bar at upper left of the screen.
    In the dropdown menu, select Preferences (or press the Command key with the , key)
    In Preferences, select the General tab (the first one at the left), uncheck the box marked '*Open "safe" files after downloading*'
    That prevents downloaded files from automatically opening the assigned Apple application program.

  • How to deselect the default option in dropdown list in Adobe Pro XI?

    I know how to change the default option in properties, but I don't want there to be a default at all. When the user opens the form, I want the fields to be blank.

    Screenshot 1: form when opened with Reader as the user will open it.
    Screenshot 2: the "Physical Needed" option where I cannot seem to deselect the default
    Screenshot 3: the "Hearing Test Needed" option where there is no default - this is what I want!!!
    When I first made the file, I made several drop-down lists as you can see here and when the form is first opened, they are blank. Then later, when I had to make some changes to the options, the program selects a default, like the "Physical Needed: field: (I set it to None, since I couldn't make it blank.) I like the form to be blank when opened so the person filling it out can easily see which options still need a selection. I don't want those 2 defaults of "None". I've tried copying a existing field, but as soon as I make changes to the selection options in Properties, a default option is default is set and I cannot seem to un-highlight all the options in the Item List:.

  • How to change the message in CUCM 7.1(2) " Your Current Options"

    Hi,
    Can any one help me how to change the system message in CUCM 7.1(2) " Your Current Options" to another text.
    Thanks...

    As far as I know you can't change that on CUCM.
    On CME you can.
    Bye,
    Jan
    Sent from Cisco Technical Support iPad App

  • How do I change the printer options on an ipad air?

    i am changing service provider. Currently they overlap. My ipad is happy to find the current old provider but cannot find the new provider even when i switch to that network. I cannot find any options for changing printer options. how can I change the printer option to access the new provider? i have 4 weeks to get the answer. Thanks

    If you mean that the iPad is tied to another user's iCloud account, you have to ask them to erase the device for you. You can't do it on your own. The device requires their Apple ID and password in order to turn off Find My iPad and to delete the iCloud account.
    IF you just want to sign into another Apple ID (not recommended either) go to Settings>iTunes and App store>Apple ID and sign out of that ID and sign into your ID,

  • I modified the budget categories on the numbers template so now the transaction tab does not communicate with the budget tab. I figured out how to change the drop down options but how do I get it to reflect on my budget sheet? Please help.

    If you are familar with the Numbers Budget Template it has two tabs 'Budget' and 'Transactions'. If you use the template as it is designed when you input expenses on the transaction tab it will automatically add that amount into the selected category on the budget tab. I have madified my budget tab to reflect the caegories that I need, which included adding several to the template. I also added to the table so it reflects my income and expenses so I can track where I am at with a glance. Since I did this, I can't get my transactions tab to communicate with the budget tab. I figured out how to change the options in the drop down box for category but I con't figure out how to get it to reflect onto my budget tab. I'm sure that it is an easy fix, however, I am just not well versed in Numbers. I appreciate your time in helping me with this issue.
    Respectfully,
    Jon

    My guess is that while you added catetories to your Budget Sheet by adding new lines and filling in the category column, you didn't also add the formulas to these new budget lines.
    The proper way to add those lines would have been to select a cell in the line just above where you want to add a line and type Option/Alt-DownArrow. This would have copied the formulas into the new line. Maybe you did this, and maybe not. You didn't give details on how you added the lines.
    Select C2 and D2 and Command-C to copy them to the Clipboard.
    Select all the cells of Columns C and D except for the top and bottom rows and Command-V to Paste.
    If I have properly guessed the problem, you should be in business. This assumes that your Categories are exaclty the same as the entries in your Pop-up menus. Spelling counts, as does case.
    Jerry

  • How can i used pai in screen 1000 to change the select-options field?

    hi,all.
    I want used pai to change the select-options field,but it can't works.
    the mainly code is:
    REPORT  ZTEST99.
    TABLES :MARA,MAKT,MARC.
    SELECTION-SCREEN BEGIN OF BLOCK B0 WITH FRAME TITLE TITLE0 .
    select-options:s_matnr for mara-matnr,
                   s_werks for marc-werks MODIF ID ID1.
    SELECTION-SCREEN END OF BLOCK B0.
    parameters:p_flag as checkbox.
    at selection-screen OUTPUT.
       LOOP AT SCREEN.
       IF P_FLAG = 'X' .
       IF screen-group1 = 'ID1'.
             screen-input = '0'.
        ELSE.
          screen-input = '1'.
        ENDIF.
        MODIFY SCREEN.
    ENDIF.
        ENDLOOP.
    START-OF-SELECTION.
    CALL SCREEN 1000.
    when i click p_flag,then i want to change s_werks from OBLIGATORY to no OBLIGATORY.
    how can i realized?
    Thanks for all.
    Sun

    Hi ,
    change your code like this.
    Change in your code:
    SELECTION-SCREEN BEGIN OF SCREEN 100.
    SELECT-OPTIONS : s_matnr for mara-matnr,
    s_werks for marc-werks MODIF ID ID1.
    SELECTION-SCREEN END OF SCREEN 100 .
    At selection-screen.
    if sy-dynnr = '100'.
    IF P_FLAG = 'X' .
    LOOP AT SCREEN.
    IF screen-group1 = 'ID1'.
    screen-required = '0'.
    ENDIF.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    else.
    LOOP AT SCREEN.
    IF screen-group1 = 'ID1'.
    screen-required = 1.
    ENDIF.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    my code :
    REPORT  Z50871_SELECTOPS_DYNAMIC.
    PARAMETERS : CH_EBELN AS CHECKBOX,
                 CH_VBELN AS CHECKBOX.
    DATA: V_EBELN TYPE EKKO-EBELN,
          V_VBELN TYPE VBAK-VBELN.
    SELECTION-SCREEN BEGIN OF SCREEN 100.
    SELECT-OPTIONS : EBELN FOR V_EBELN MODIF ID G1,
                     VBELN FOR V_VBELN MODIF ID G2.
    SELECTION-SCREEN END OF SCREEN 100 .
    AT SELECTION-SCREEN OUTPUT.
      IF SY-DYNNR = 100.
        IF CH_EBELN = 'X' AND
           CH_VBELN = ''.
          LOOP AT SCREEN.
            IF SCREEN-GROUP1 EQ 'G1'.
              SCREEN-ACTIVE = '1'.
            ELSE.
              SCREEN-ACTIVE = '0'.
            ENDIF.
            MODIFY SCREEN.
          ENDLOOP.
        ELSEIF CH_VBELN = 'X' AND
           CH_EBELN = '' .
          LOOP AT SCREEN.
            IF SCREEN-GROUP1 EQ 'G2'.
              SCREEN-ACTIVE = '1'.
            ELSE.
              SCREEN-ACTIVE = '0'.
            ENDIF.
            MODIFY SCREEN.
          ENDLOOP.
        ELSEIF CH_EBELN = 'X' AND CH_VBELN = 'X'.
          LOOP AT SCREEN.
            IF SCREEN-GROUP1 EQ 'G1'
               OR SCREEN-GROUP1 EQ 'G2' .
              SCREEN-ACTIVE = '1'.
            ENDIF.
            MODIFY SCREEN.
          ENDLOOP.
        ENDIF.
      ENDIF.
    AT SELECTION-SCREEN.
    IF SY-DYNNR = 1000.
      IF CH_EBELN = 'X' OR CH_VBELN = 'X'.
        CALL SELECTION-SCREEN 100.
      ELSE.
        MESSAGE I000(Z50871MSG) WITH 'Please select atleast one checkbox'.
      ENDIF.
    ENDIF.
    regards
    Sandeep Reddy

  • How do you change the synch options?

    I've researched this quite a bit and cannot find a single valid set of instructions on how to change the synch settings on the iphone in itunes. All of the instructions I find seem to refer to a previous version of itunes and non-existent tabs such as "preferences" or "info."  Why is it so hard to do such a basic function? What I want to do is to have it stop synching my bookmarks.

    - Connect you device, click on it on the left side.
    - In the center window your settings are shown (Device Name, Phone Number and so on) right?
    - Above this are some tabs, and one is named "Info". Left-click on it.
    - Now scroll down and "Voila": There's the option to stop syncing notes an bookmarks ...
    Btw, it's not hard to do such basic info, and it's even easier to take a look into iTunes help

  • I need to know how to block the option menu on firefox because my students change the connection option bypassing the proxy that should block them when it's not alloud surf on the web. Thank's

    I need to know how to block the option menu on firefox because my students are able to change the connection option bypassing the proxy that should block them when it's not alloud surf on the web. Thank's

    See http://kb.mozillazine.org/Locking_preferences
    <code>//
    lockPref("network.proxy.type", 1);
    lockPref("network.proxy.http", "");
    lockPref("network.proxy.http_port", "");
    </code>
    See:
    http://kb.mozillazine.org/network.proxy.type
    http://kb.mozillazine.org/network.proxy.%28protocol%29
    http://kb.mozillazine.org/network.proxy.%28protocol%29_port

  • How to change the default currency in CJ32 and CJ33

    Dear all,
    As required by the user, I want to know how to change the default currency from controlling area currency to object currency in TCODE CJ32 and CJ33. Currently, the controlling area currency will be defaulted in the field "Views in".
    Could any one help me? Points will be awarded.
    Thank you.
    Christina.
    Edited by: Virendra Pal on May 5, 2010 8:34 AM

    Hi Christiana ,
    Once you are in tcode CJ30 / CJ32 , Enter either Project definition or WBS element and this shall take you to the Budget screen and once you are here you can find a drop down with two options .One is Controlling are currency and the other one is Object currency.
    Since the Currency is set to Object currency in OPS9, System shall allow the budget values in Object currency and if the user wants to see the same values in Controlling are currency ,then the user needs to view the values in Controlling are currency using the drop down .
    Regards
    Judy

  • How to change the default window size display font size on Lync 2013 main window?

    Hi champs,
    Just a simple non-technical question: How to change the default window size display font size on Lync 2013 main window on Windows 7 desktop?
    Thanks,

    Hi,
    Did you mean change the Lync: Change the Default Font and Color of Instant Messages just as Edwin said above?
    If not, as I know, there is no natural way to change it.
    If yes, on the latest version of Lync 2013 client, there is a new option “IM” on Lync client “Options” list. And you need to change the default Font and Color of IM in the interface of “IM”.
    Best Regards,
    Eason Huang
    Eason Huang
    TechNet Community Support

  • How to change the default structure when exporting data in CSV format?

    Hello,
    can some one tell us how to change the default structure in CRM when exporting lists in CSV format (with Option "Always use unformatted list format (CSV) for download" ? Because we want to add a new structure for our own -is it possible ?
    If it is possible where can we find these structure ? In the blueprint customizing ?
    Thank you very much,
    Christian

    There is a workaround to move from 1.5 version to the older 1.4 version. But this could be specific to the browser setting the JRE version.
    Excerpts from sun docs:
    However, a user can still run older versions. To do so, launch the Java Plug-in Control Panel for the older version, then (re)select the browser in the Browser tab.
    Example:
    Assume you are running on Microsoft Windows with Microsoft Internet Explorer, have first installed version 1.4.2, then version 5.0, and you want to run 1.4.2.
    Go to the j2re1.4.2\bin directory where JRE 1.4.2 was installed. On a Windows default installation, this would be here: C:\Program Files\Java\j2re1.4.2\bin
    Double-click the jpicpl32.exe file located there. It will launch the control panel for 1.4.2.
    Select the Browser tab. Microsoft Internet Explorer might still appear to be set (checked). However, when 5.0 was installed, the registration of the 1.4.2 JRE with Internet Explorer was overwritten by the 5.0 JRE.
    If Microsoft Internet Explorer is shown as checked, uncheck it and click Apply. You will see a confirmation dialog stating that browser settings have changed.
    Check Microsoft Internet Explorer and click Apply. You should see a confirmation dialog.
    Restart the browser. It should now use the 1.4.2 JRE for conventional APPLET tags.
    Details are here
    http://java.sun.com/j2se/1.5.0/docs/guide/deployment/deployment-guide/jcp.html
    My system (Windows XP) has the version 1.5_09 set as the default. However i just installed JRE 1.5_06 and would like to revert back to _06 as the default JRE..
    Will update if i find more information

  • How to change the default sorting in iTunes

    Hi,
    Does anyone know how to change the default sorting method for all items in iTunes?  I use the third option for organizing the library as a whole (the one that has a list of icons for bands that you double click to show only that band's songs).  The only sorting method I use is to sort by Album by Year (ascending), this makes the most sense to me.  I can tell that iTunes is attempting to remember when I do this for certain artists, but it epically fails at maintaining this sorting pattern.
    To be clear, say I open Radiohead and click through to have it sort with the above method.  Everything works great, but when I return a few days later to play Radiohead again, the sorting is not maintained.  It could be as simple as sorting in a descending direction, or could even be trying to sort by the number it was added in my library.
    I'd really appreciate it if someone knew of a way (maybe even through scripts if possible / the only solution) to eliminate this problem and have every (NOT just the artists who I've told iTunes to sort a specific way) artist sort that way.
    I don't know if my copy is just corrupt?  It may be, since for some artists it's started playing them in the above mentioned order they were added to my library even if I force a sort by album by year (i.e. it will go from playing a 2007 album to a 2002 album and not the 2008 album).
    Thanks!

    Andrew, I know I am extremely late to the party but I too use Grid View.  I had the same problem that you had but have found this to work for me.  I used it and it is still holding as my default sorting even after switching between the Artist page and Grid View.
    Once you are inside of the Artist page continue to click on the Album column until it shows Album by Artist/Year.
    That will give you each album sorted by the year instead of it randomly sorting it for you each time you leave an Artist's page and then back again.
    Hope this helps.

Maybe you are looking for

  • My computer has been going slow,not it is freezing up every time I stop using the mouse

    my Imac ,OS X version 10.9.5 The computer has been very slow, and is now freezing up All I can do is shut it down and start up again

  • Can't download videos....help!

    Can't download videos. When they start to download, hundreds of lines fill the page with letter and numbers mixed then it goes out of safari (google & yahoo) and back to home screen. Iphone 3GS

  • How can i make my photos only 500kb

    My 15 year old digital camera finally died.  I want to use my iPhone camera, but the pic sizes are too big.  I need then 500 kb or less.  I sell on eBay and my auction management software (Vendio) can't do my iPhone pix because they are too big.  Is

  • Problems with Fullscreen viewing

    I was viewing a trailer for a movie and at first I watched it at the size it opened as. I thought the trailer was good so I wanted fullscreen of it. So I click View>FullScreen. It opens up with the Green "This preview has been approved for all audien

  • Extreme heat when on charge

    hey everyone, i just bought my macbook pro yesterday.( new 15" 2.2GHz i7 processor) i put it on charge while using it and it became really hot. also when I'm on Skype the fan starts spinning a lot and my macbook heats up and i cant keep it on my lap.