Dynamic embedding of DTD in DOM

Hi
I am parsing the below XML which is uploaded by the user.
<?xml version="1.0"?>
<carList  name=””>
<car>
<name/>
<model/>
<cost/>
</car>
</carList> Similarly user can upload even truck.xml or flight.xml, which are having seprate DTDs for validation.
I have a DTD to validate the XML file provided by the user. But I dont want the user to know about this validation and DOCTYPE element will not be available in XML file
( <!DOCTYPE car SYSTEM "someurl/car.dtd"> ).
DOM provides option only to enable validating (setValidating(boolean). But, Is it possible to set the DTD file too dynamically ???

hi Runal ,
have a look at this video presntation for dynamic embedding of views :
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/media/uuid/5cb731e7-0b01-0010-1792-fbe5f55e39d2
or
I wud suggest u to procced like this :
1 In design time , insert all ur views inside ur tansparent container
2 * initially set all ur view to invisible* , for this :
Re: Making UI elements visible at runtime based on events.
a) make a context attribute of type WDUI_VISIBILITY
b) bind this attribute wid ur view
c) set the view to invisible by setting the context attribute to '01' using set_attribute method
   DATA lo_nd_cn_visiblesuper TYPE REF TO if_wd_context_node.
    DATA lo_el_cn_visiblesuper TYPE REF TO if_wd_context_element.
    DATA ls_cn_visiblesuper TYPE wd_this->element_cn_visiblesuper.
    DATA lv_ca_visible LIKE ls_cn_visiblesuper-ca_visible.
*   navigate from <CONTEXT> to <CN_VISIBLESUPER> via lead selection
    lo_nd_cn_visiblesuper = wd_context->get_child_node( name = wd_this->wdctx_cn_visiblesuper ).
*   get element via lead selection
    lo_el_cn_visiblesuper = lo_nd_cn_visiblesuper->get_element(  ).
*   get single attribute
    lo_el_cn_visiblesuper->set_attribute(
      EXPORTING
        name =  `CA_VISIBLE`
        value = '01').
// context attribute CA_VISIBLE under node cn_visible set to invisible
3 nw based pn ur condition , whn u wanted to do dynamic embedding , at tht time make ur view visible inside ur appropriate method
this wud do
rgds,
amit

Similar Messages

  • How Automate Dynamically Embedding Customer Names from a List into PDF Footer?

    Mavens,
    After discovering that a PDF training workbook of mine has been widely copied (without authorization), I'd like to "personalize" future versions of this artifact with the customer/user name dynamically embedded in each PDF's footer.
    Based on your experience, what is the easiest, quickest & most economical way to: generate a set of PDFs (from a "Master") where each individual PDF is personalized with a user/customer name in the footer (e.g., "This document is licensed to {FRED BLOTZ} at {BIG COMPANY, Inc.}. Duplication or distribution is not authorized.").
    The desired workflow is:
    1. Create an MS-Excel Workbook with a list of all trainee (user) names.
    2. Open some type of "PDF Personalization" tool.
    3. Provide the path to the "Master PDF" to the tool.
    4. Provide the name of the customer (company) to the tool.
    5. Provide a path to the MS-Excel Workbook with list of individual's names.
    6. Provide a path to a folder where the tool should write the generated PDFs.
    7. Click a button ("Generate Personalized PDFs").
    Then...distribute individualized PDFs to trainees.
    Is there a tool out there somewhere which provides the desired solution?
    Thank you in advance for your experienced-based suggestions.
    Plane Wryter
    PS: While I fully appreciate the on-going discussions regarding the merits/lack-of-merits of DRM, etc...if you elect to reply to this request...please be so kind as to focus on the question as presented and avoid clambering onto a soapbox to "rant" about DRM...or suggest increasing the fee to the customer (a big firm that only pays "per-trainee" fees) to cover distribution. Thank you.

    go to database, show sql query. please paste the query in here it will be easier to help you
    if you cant seem to get it from there, go to database, database expert and edit the command file. (if that is the dataset you are using) copy and paste that.

  • Dynamic embedding of view in used component

    Hi All,
    I have a scenario were i have to provide print functionality to all the views of an existing web dynpro component. This component has around 20 views. I have developed a new component for the print functionality were i am using BSP to fire the CTRL+P function.
    But the problem is how do i get the view at runtime in my print component.....?
    I tried passing the view controller reference to the print component through context binding, but i am unable to embed the view through the reference in to the print component view container element.
    Is there any way i can acheive this....???
    Any help will be appreciated..!
    Regards,
    Runal

    hi Runal ,
    have a look at this video presntation for dynamic embedding of views :
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/media/uuid/5cb731e7-0b01-0010-1792-fbe5f55e39d2
    or
    I wud suggest u to procced like this :
    1 In design time , insert all ur views inside ur tansparent container
    2 * initially set all ur view to invisible* , for this :
    Re: Making UI elements visible at runtime based on events.
    a) make a context attribute of type WDUI_VISIBILITY
    b) bind this attribute wid ur view
    c) set the view to invisible by setting the context attribute to '01' using set_attribute method
       DATA lo_nd_cn_visiblesuper TYPE REF TO if_wd_context_node.
        DATA lo_el_cn_visiblesuper TYPE REF TO if_wd_context_element.
        DATA ls_cn_visiblesuper TYPE wd_this->element_cn_visiblesuper.
        DATA lv_ca_visible LIKE ls_cn_visiblesuper-ca_visible.
    *   navigate from <CONTEXT> to <CN_VISIBLESUPER> via lead selection
        lo_nd_cn_visiblesuper = wd_context->get_child_node( name = wd_this->wdctx_cn_visiblesuper ).
    *   get element via lead selection
        lo_el_cn_visiblesuper = lo_nd_cn_visiblesuper->get_element(  ).
    *   get single attribute
        lo_el_cn_visiblesuper->set_attribute(
          EXPORTING
            name =  `CA_VISIBLE`
            value = '01').
    // context attribute CA_VISIBLE under node cn_visible set to invisible
    3 nw based pn ur condition , whn u wanted to do dynamic embedding , at tht time make ur view visible inside ur appropriate method
    this wud do
    rgds,
    amit

  • Embedded Quicktime movies and DOM layering?

    Is there any way to overlay something on top of a quicktime movie in a web page without the quicktime movie showing through it?
    http://www.boozhowtooz.com/trailer
    I have a low res and high res version of a trailer where clicking the high res link overlays the movie in the a thickbox on the page. depending on the browser, the low res movie with show through the layer.
    I've been searching the web for a solution but the best one I've found is to remove the low res movie with javascript when the high res link is clicked. not exactly ideal but doable if that's the only thing that works.
    Is this a general problem with the quicktime plugin and dom layering?

    I'm sorry for saying that David, but you are not right in this point. You would have right if you say that every web page embedded object (flash, quicktime, activx, etc.) has a parameter (wmode, window mode) which is set to true by default. BUT if you are using flash object (flash video) you can set the wmode parameter - as far as I know there are no other embeddable objects which accept this parameter.
    And I think it's a bug, and not in browsers but (in this case) in Quicktime - I can't understand why Apple can't solve this problem. It's one key problem why most web developers (neither I) can't use QT on more complex web pages or in web applications. Easy examples:
    __ you can't drop a popup over a QT video (you can do it with a Flash video)
    __ you can't embed QT into fixed header/footer web pages with scrolling content (it overflows the header/footer
    __ you can't put any navigation over QT objects (imagine the situation: I'm working on an UI which has self slide-bar to navigate within a video, you can add/remove annotations, logs, messages etc. and not for just one video but for more synchronized ones > you I'll need a scroll-bar to display all of these, but if you scroll the videos 'under' the navigation hides the navigation...)
    So to conclude this short message: In my opinion this is a big problem with Quicktime, and I'm wondering why such a big company like Apple can't manage this problem (probably the web 'market' of QT is not big enough - in fact this is an issue why web developers don't like QT embeds...)
    Thanks.

  • Dynamically embedded swf, has it ever worked

    I have to repost it. Wondering what adobe will say about it.
    I have tried this for a couple of days. I created a swf object in window.onload (also tried to create it directly while the script was loaded ), then call an AS function from JS. statically embedded swf works for both IE8 and FF, FF also fine for dynamically loading. In IE, this call externalinterface.call("echo", "as returns " + b); always shows "as returns false". The callback function has never worked in other approches with dynamic creation. Anyone has good experience?
    Thanks.
     //js
    <script language="javascript">
    var containerready=false,flashready=false;
    function addLoadEvent(func) {var oldonload = window.onload; if (typeof window.onload != 'function') {
    window.onload = func; } else { window.onload = function() { if (oldonload) { oldonload(); } func(); }}
    function embedswf(){
    var a,swf="<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000'";
    swf+=" codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10, 0,0,0'";
    swf+=" width='215' height='318' id='testswf1' align='middle'>";
    swf+=" <param name='allowScriptAccess' value='always' />";
    swf+=" <param name='allowFullScreen' value='false' />";
    swf+=" <param name='movie' value='testswf1.swf' />";
    swf+=" <param name='quality' value='high' />";
    swf+=" <param name='wmode' value='transparent' />";
    swf+=" <embed src='testswf1.swf' quality='high' wmode='transparent' width='215' height='318' name='testswf1' align='middle' allowScriptAccess='always' allowFullScreen='false' type='application/x-shockwave-flash' pluginspage='http://www.adobe.com/go/getflashplayer' /></object>";
    a=document.createElement("div");
    a.id="swfholder";
    a.innerHTML=swf;
    document.body.appendChild(a);
    containerready=true;
    window.setTimeout(callas, 100);
    } addLoadEvent(embedswf); function echo(p){ alert(p)}  function callas()
    // alert("callas:containerready="+containerready+";fl ashready="+flashready);
    containerready=true;
    if(flashready){
    var a=getswf();
    a&&(a.flashfunc())
    return
    window.setTimeout(callas, 100);
    } function setflashready()
    flashready=true;
    function getcontainerready()
    //alert("getcontainerready:g31="+containerready+";fl ashready="+flashready);
    return containerready;
    function getswf()
    if (navigator.appName.indexOf("Microsoft") != -1)
    return window["testswf1"];
    else
    return document["testswf1"];
    } </script> //as
    import flash.external.ExternalInterface; flash.system.Security.allowDomain("*"); var rtm:Timer = new Timer(500);
    startTest(); function f0():void {
    ExternalInterface.call("echo", "one");
    function timerHandler(event:TimerEvent):void
    if (isContainerReady())
    rtm.stop();
    rtm.removeEventListener(TimerEvent.TIMER, timerHandler);
    setupCallbacks();
    function startTest():void
    if (ExternalInterface.available)
    try
    if (isContainerReady())
    setupCallbacks();
    else
    rtm.addEventListener(TimerEvent.TIMER, timerHandler);
    rtm.start();
    catch(error:Error) {
    trace("An Error occurred: " + error.message + "\n");
    else
    trace("External interface is not available for this container.");
    function isContainerReady():Boolean
    var b:Boolean = ExternalInterface.call("getcontainerready");
    ExternalInterface.call("echo", "as returns " + b);
    return b;
    } function setupCallbacks():void
    ExternalInterface.call("echo","setupcallback");
    ExternalInterface.addCallback("flashfunc", f0);
    ExternalInterface.call("setflashready");

    has it ever worked or is an Adobe bug? anyone knows?

  • Dynamic Embeded Assets

    So I have a class with a bunch of embedded assets for my
    project. I now want to re-use this same code base for another
    project and dynamically switch out these dynamic assets depending
    on the project. Is there a way to insert a variable in the source
    of these embedded assets.
    [Embed(source=myBackground)]
    [Bindable]
    public static var background:Class;
    I

    did you try adding width/height attributes to the image.  they say the img tag is experimental still, so with the symbol reference it might not know the width and height to use, it still displays properly (the image piece only) but the rest of the html text doesn't know how to deal with it?

  • Embedding a dtd with jdom

    Does anyone know how to embed a dtd into the xml using jdom? Thanks,

    I confused myself a bit there; it's not possible in the latest release but if you fetch the latest src from CVS, you'll see that DocType and XMLOutputter has added internal subset support (but AFAIKS it's just a string; no objects)...

  • Dynamic Embedded Character Sub-Setting ???

    Hi All,
    I have instruction movies with 30 plus languages that I will be uploading to YouTube. I have Flash CS5 - AS3 - Player 10 req.
    I need to add only the font groupings (Latin, Cyrillic, Chinese, etc.) needed for the language specified and ideally only those characters that are being used by the selected language when the file is processed/complied.
    1. Can I programmatically add the characters being used to the internal list of embedded characters? Even if I have to run it twice to get it into the Library Font Object?
    2. Can I programmatically set the language grouping? I know I can turn layers that call different fonts off and off.
    3. Does the embedded character subsetting have a character limit? I can always make a utility to read the XML tags the have my displayed text and make a file or clipboard that I can paste it into the library. But, this is slow and tedious when you have 30 plus languages and 30 plus movies. I am trying to automate this whole process and limit inspection and non-automated testing.
    When I use this on a users CD, all fonts will be in a shared SWF. The fonts are over 8mb in size.
    I have a small issue with the #2 method - I have the potential need have Unicode characters in a text string that is in a ASCII based programming language. (FYI - the programs parser is smart enough to process the text string embedded in the code). I would hate to burden the movie with all the Chinese Characters or my newbie users/programmers (cough, cough) of my movie template with the task of ensuring that all characters a truly emdded and supported.
    Thanks,
    Jim

    A few points:
    (1) The point of embedding fonts in a PDF file is to make it possible for the PDF file to be properly displayed and printed by recipients of the PDF file that don't have the same exact fonts you do. Adobe recommends subset embedding of fonts whenever possible for highest quality display and printing of PDF file text. The subsetting includes only the glyphs you use and thus can save considerable file size. (For example, the Arial font in Windows is over 700K in size including all the glyphs for not only Western Latin languages, but also Cyrillic, Greek, Arabic, and Hebrew alphabets. Subsetting usually reduces the amount of the font embedded to 25K or less for typical documents.)
    (2) You don't own the fonts. You own a license to use the fonts. That is a very important difference!
    (3) Remember that PDF is a “final form file format” with very limited editability. If you need to do any extensive editing, you should have the source file, whether .AI (for Adobe Illustrator), .INDD (for Adobe InDesign), .DOCX (for Microsoft Word), etc. to you. You are responsible to getting a license for the fonts used in these documents if you don't already have one.
              - Dov

  • Dynamically Download cXML.DTD in XI

    Hi -
    I have an IDOC->XI-cXML Scenario.
    Using cXML dtd from cxml.org i download the cXML DTD and the use it in XI through external definition and i will do the mapping.
    What happens is after some time say 2 months, cXML DTD is modified and a new version is released,  do i have to download the cXML DTD schema again and have to rework on the complete scenario?
    Let me know if there are any other way to do this.
    Thanks in advance.
    Kumar Pappu

    Hi Tirumal,
    You don't have to rework on the complete scenario.
    If you have to import the new version of CXML DTD or schema, you have to import the cXML DTD into External definitions of IR.
    In the message mapping replace old version cXML with the new version. Your mapping will not be affected. You have to do the mapping for any modified fields or newer fields that were not in the old  version.
    Rgds,
    Sam Raju

  • Dynamic embedding of video file in pdf

    Hi,
    I wanted to embed a video file ( *.mp4 format) in a pdf file programatically.
    I am using C# / Asp.net 4.0.
    Please let me know if there is any way / any tools do to it.
    Thanks,
    Uma Nath

    1
    Open the PDF in which you want to embed and autoplay a movie  in Acrobat Pro. Click "File" on the menu bar and choose "Open" to  display the Open dialog box. Navigate to the PDF, select it, and then  click the "Open" button.
    2
    Go to the page where you want to embed the movie. Acrobat's "Page Navigation" controls are on the left side of the Toolbar.
    3
    Click "Tools" on the menu bar and choose "Multimedia," and  then select "Flash Tool" from the Multimedia fly-out menu. Click and  drag on the page were you want the movie to display to draw a Flash  object control box. This opens the "Insert Flash" dialog box.
    4
    Click the "Browse" button to display the "Select a File"  dialog box. Navigate to the SWF, select it and click the "Open" button.  Click the "Show Advanced Options" check box at the bottom of the Insert  Flash dialog box to expand the dialog box to display advanced options.
    5
    Click the "Launch Settings" tab. Click the "Enable When"  drop-down and choose "The page containing the content is opened." Click  "OK." The movie will now autoplay when the page containing it is opened.
    Bobby Johnson.

  • How to create DTD from XML using DOM

    Hi,
    Is there a way to create a corrosponding DTD of a xml-file using DOM. I have a XML-file that's pretty huge I want to create a DTD for that XML-file using DOM. Can anyone plz. lead me how to do this. I tried to use XMLSpy to convert the XML into DTD but the resulting DTD is not correct. Is there a way to create the DTD using DOM.
    Any help is really appreciated. Thanks

    When you say you are trying to convert XML to DTD, do you mean you are trying to convert a XSD (schema) to a DTD, or that you are trying to create a schema that corresponds to a given XML document.
    Realize that DTDs are not very powerful. XSD documents allow for much more detail. I don't have a proof, but I'm absolutely confident that any DTD can be expressed as a schema but not all schemas can be represented as a DTD. In other words, DTDs are not worth the trouble, in my opinion.

  • How to use dynamic action to fill multi item on a page ?

    Hi..
    I want to fill multi items on a page so I build a dynamic action ( Execute PL/SQL Code ) to do it .The problem is that when the page loads I can't see any data and I tried to see the session values using debug and I found data. Moreover when I save the row I got these data saved.
    So what is the magic there?
    Thanks

    Firstly, to get the multi-select populated with "pre-selected" values the easiest approach is to use Computation or Process at a process point On Load Before Header or After Header or Before Regions.
    All you need to do is populate your "Select List " page Item with : (colon) separated list of selected values. E.g is you want A,B and C out of A,B,C,D,E selected then get A:B:C into the Page Item.
    If you have used Dynamic Actions, what is your event on which the action fires? For Dynamic-Actions the page (HTML DOM) needs to be existing , so it must fire after the page has loaded.
    Regards,

  • Dynamic navigation causing problems

    Hi All.
    I know it has been discussed before, but my problem is a bit more complex.
    also earlier Sascha had mentioned that he created OB plugs dynamically. I am not able to know how to create those dynamically.
    Okay, scenario is: My main application is dynamically embedding MANY other components based on a config table.
    This I have done in the Handle_ib event of the view.
    When user goes back, and comes in again, (based on some parameters in the main screen), the configuration table may change and new or less components need to be embeeded then. It is giving a dump - after debugging i found it is trying to go to previous links also which are not valid.
    So far I was using DO_DYNAMIC_NAVIGATIOn, and the source OUTBOUND plug was static till now.
    From other threads, I guess we have to create a new outbound plug each time.
    Can someone please advise me how to go about it? Or, is there a way to delete my previous navigation links.
    Thanks in adv.

    Hi Aishi,
                 I am not sure but let's give a try, try changing the life time of  your second view to 'when visible'  from 'framework Controlled'. it can be done on the propery tab of the corresponding view.
    Regards
    Sarath
    Message was edited by:
            sarath satheesan

  • Rotate Dynamic text and make dynamic text go vertical

    Hello
    I am working on a visual customizer flash app in actionscript 2.0. Looking for good tutorials or examples of how to rotate dynamic text as well as how to make it vertical. Currently all the dynamic embedded text changes colors and size.
    Any help would be greatly appreciated. Thank you.

    distribute each character to a textfield and arrange the textfields to suit your needs.

  • Loading font libraries dynamically; having some problems.

    I am using SWF font library classes (done with FlashDevelop) to be able to have dynamically embedded fonts in an application. All text/graphic components are drawing styles from a plain (non-swf) CSS file, which supplies all the text/label components with a generic font name, to which the dynamic font is imported.
    Example: User is using Arial.
    App imports ArialFont.swf which has embedded:
    - Arial Regular
    - Arial Bold
    - Arial Regular with embedAsCFF=false
    and maps them to an internal generic font name:
    - MyFont (regular)
    - MyFont (bold)
    - MyFontCFF (embedAsCFF=false)
    This is working perfectly, for the dynamically generated components.
    However, the s:Label components that are laid out with MXML in the application are loading before the fonts are properly loaded and embedded, and they are displaying with Times New Roman (system default), even though the embedded fonts are now loaded and ready.
    Is there a way for me to force these static s:Label components to update their view to include the newly embedded fonts?
    Thanks,
    -J
    Message was edited by: jethroq :: Reason: clarification

    See the embedded font post on my blog to make sure everything is set up correctly.  However, you might just need a call to the undocumented styleManager[“styleDeclarationsChanged”]();
    Alex Harui
    Flex SDK Team
    Adobe System, Inc.
    http://blogs.adobe.com/aharui

Maybe you are looking for

  • Page failure when attempting to save java script in html header

    Currently there is java script code for a function that is seeded in the html header of a forms page by apex when the form is generated. This code is for the chicken test for the DELETE button. The function works as designed, but if I try to "APPLY C

  • TS2621 Keep getting connection to server failed

    When ever I try to go into mail I get a message telling me the connection to server has failed

  • How do I edit the shared drop down menu in sidebar?

    I work in a design studio. We have 6 macs that we share files between. There are also close to twenty PCs on our network that I don't need to connect to. I want to have all the macs at the top of the list for easy access but at the minute I am seeing

  • APO and BW on separate systems

    Hi guys, we are currently setting up a new landscape our company. We'll have one APO (newest version, 7.0) with life-cache and one BW (7.0). I am just wondering, why we create two systems and not just one, because APO is based on the BW technology. I

  • Franchise scenarios financial postings in SAP Retail

    Have anybody implemented SAP R45 franchise scenario /  a separate company code per Franchise scenario without a dummy company code? If a dummy company code where did the Franchises perform full financial accounting e.g. in a separate system (integrat