__processRuleSet will not accept 'div1' tag

Hi All,
CS3/Javascript/Windows
It is very interesting error.
I want grep xmlElements from the Indesign XML file.
When i am giving 'div1' tag in the __ProcessRuleSet, It show the error (attached), If i give other then the 'div' tag, it is working fine.
what was the problem with 'div'? Is it CS3 bug or mine?
My code is below
var tag='div1';
var myArray=new Array();
var DoiRuleSet = new Array(new FindDivElement("//"+tag, myArray));
__processRuleSet(ele, DoiRuleSet);
function FindDivElement(myrule, myArray)
     this.name = "FindElement";
     this.xpath = myrule;
     this.apply = function(myElement, myRuleProcessor)
          myArray.push(myElement);
Regards,
sudar       

Hi sudar,
Here's an example:
#include "glue code.jsx";
main();
function main(){
    mySetup();
    mySnippet();
function mySetup(){
var myDocument = app.documents.add();
var myXMLTag = myDocument.xmlTags.add("div1");
var myRootXMLElement = myDocument.xmlElements.item(0);
myRootXMLElement.xmlElements.add(myXMLTag);
myRootXMLElement.xmlElements.item(-1).contents = "A";
myRootXMLElement.xmlElements.add(myXMLTag);
myRootXMLElement.xmlElements.item(-1).contents = "B";
myRootXMLElement.xmlElements.add(myXMLTag);
myRootXMLElement.xmlElements.item(-1).contents = "C";
myRootXMLElement.xmlElements.add(myXMLTag);
myRootXMLElement.xmlElements.item(-1).contents = "D";
function mySnippet(){
var myDocument = app.documents.item(0);
var myArray = new Array;
var myElementName = "div1";
var myString = "//" + myElementName;
//This rule set contains a single rule.
var myRuleSet = new Array (new FindDivElement(myString, myArray));
with(myDocument){
  var elements = xmlElements;
  __processRuleSet(elements.item(0), myRuleSet);
alert("Rule found " + myArray.length + " elements.");
function FindDivElement(myString, myArray){
this.name = "FindDivElement";
this.xpath = myString;
this.apply = function(myElement, myRuleProcessor){
  myArray.push(myElement);
Thanks,
Ole

Similar Messages

  • JES Messaging Server 6.0 will not accept mail alternate address

    JES Messaging Server 6.0 will not accept mail alternate address
    I have installed the Sun ONE Messaging server 6.0 as part of an evaluation of the Java Enterprise System. This was installed along with Directory Server 5.2 and Identity Server 6.1. During the installation I created a top level organization (o=internet) knowing that I would want to create multiple email domains within it and a default domain. After the installation was complete I used the User Management Utility (/opt/SUNWcomm/bin/commadmin) to create some users within the default domain. I provided each user with a primary email address ([email protected]) and an alternate email address (mailAleternateAddress = [email protected]).
    In testing the system I find that the Messaging Server will not accept messages sent to the alternate email address whether sent from the same server (via Messenger Express) or from an external server. It returns the error message: 550 5.1.1 unknown or illegal alias.
    In attempting to trouble shoot this problem I have watched the Directory Server's access log when such an email is sent. It shows a query using [email protected] even though the email message was sent to [email protected] In any event the DS finds the user, but the Messaging server rejects the message.
    [date_time] conn=120 op=11 msgId=12 - SRCH base="o=domain.com,o=internet" scope=2 filter="(mail=[email protected])" attrs="preferredLanguage mail mailEq
    uivalentAddress"
    [date_time] conn=120 op=11 msgId=12 - RESULT err=0 tag=101 nentries=1 etime=0
    [date_time] conn=120 op=12 msgId=13 - SRCH base="o=internet" scope=2 filter="(&(objectClass=sunManagedOrganization)(|(associatedDomain=host.domain.com)(sunPreferredDomain=host.domain.com)))" attrs=ALL
    [date_time] conn=120 op=12 msgId=13 - RESULT err=0 tag=101 nentries=0 etime=0
    Any suggestions to eliminate this problem would be appreciated.

    Both the primary and alternate email addresses are the same as the domain of the user.
    Here is what I want to do. Email is sent to a primary email server (not this machine). Mail for some users stays on that server to be read and mail for other users is moved to a geographically separate server (the one in question) by specifying that the mail be forwarded to the specific host: [email protected] > [email protected]
    On this second server I want to host two (or more) independent email domains. I do not want one of the domains to be a subdomain of the other. So during the installation I used o=internet as the root suffix and then used a different default domain (representing one of the registered internet domains). After installation I used the commadmin tool to create a second domain so now I have what looks something like this:
    o=internet,
    __ou=People
    __ou=Groups
    __o=domain1
    ____ou=People
    ____ou=Groups
    __o=domain2
    ____ou=People
    ____ou=Groups
    I then created some users under domain1 and some under domain2 so one user's dn is:
    uid=user, ou=people, o= domain1.com, o=internet.
    Mail sent locally to user@ domain1.com gets delivered correctly, but sending to [email protected] does not.
    host2.domain1.com is the fully qualified domain name of the server.

  • Express HD Upgrade will not accept Express V1 serial number for install

    Hi,
    I've been using FCE V1 for a while now, and just purchased FCE HD as a personal Christmas present Unfortunately it will not accept the (legitimate) serial number from the V1 product during the installation, so I'm stuck at this point. Is there any trick that I'm missing here, or does the Upgrade only work from V3 or V2 serial numbers?
    Thanks,
    Graham
    Mac Mini   Mac OS X (10.4.3)  

    I have found with some software (don't remember if that included my upgrade to FCE HD or no), that sometimes, the SN in printed in lower case on the sticky tag, but the upgrade will only take upper case (or visa versa). Try using the other case if it doesn't work.
    Also, you need the serial number from the sticky tag which came with the software. The SN display in the "about FCE" splash screen is incomplete (missing at least three letters/numbers at the end).
    Ed

  • How come some of my songs will not accept artwork

    Hello,
    I have a few songs in my library that will not accept artwork. I tried several ways, but although I can put them illustration spot, they will not show up.
    It is maybe 3% of the total, but very annoying.
    Anyone with the same experience?
    MacMini   Mac OS X (10.4.8)  

    They are of the type MPEG-audiobestand MPEG-1, Layer 3.
    So they look like 'normal' mp3's.
    I see now in the info that the ones not accepting illustrations have at the iten 'Gecodeerd met:' the answer 'onbekend' (=unknown).
    There exist many applications to encode audio files to mp3's.
    Some short info about mp3-tagging:
    mp3's do not only contain the compressed audio information, but also have a 'container' for all kind of information, and from version 2 upwards room for pictures and lyrics.
    If you're not familiar with the tagging system, take a look at this page:
    http://www.id3.org/ID3v2Easy
    You can also find high-tech information on that website.
    The problem files either contain no tag at all, an old version or a modified tag.
    iTunes obviously simply refuses to add the picture to the tag.
    Try this first:
    Select a song and then choose 'Convert ID3 tags...' from the Advanced menu.
    Choose v2.2 (this is the default tag version of iTunes) and click OK.
    Try to add a picture now.
    If it works, convert the tags of all problem files and add the pictures.
    If this doesn't work try to convert the song and then add the picture to the copy:
    Select a song and Get Info. Look at the number at 'Bit Rate:' (Bitsnelheid).
    Go to Preferences>Advanced>Importing (Voorkeuren>Geavanceerd>Importeren) and set 'Import Using:' (Importeer met:) to 'MP3 Encoder' (MP3-codering). Set 'Setting:' (Instelling:) to the bit rate you found.
    Next, choose 'Convert Selection to MP3' from the Advanced menu in the menubar.
    iTunes will create a copy of the song file. Now add the picture to the copy.
    This should work.
    If it indeed works, you can repeat this procedure for all problem files.
    A way to do that, is to put the problem files in a normal playlist, select them all (Command-A) and convert them.
    When the conversion is done, check the converted files.
    To delete the originals, select the playlist with the originals and Option-Delete (press and hold the Option key, then press Delete) the playlist.
    iTunes will ask you to confirm to delete the playlist and remove the songs from the library.
    M
    17' iMac 800 MHz, 768 MB RAM, 200 GB HD, DL burner   Mac OS X (10.4.8)   iTunes 7.0.2

  • In iCal - I keep getting the error message " This calendar was created by Mail" and it will not accept any input; why..??

    In iCal - I keep getting the error message “ This calendar was created by Mail” and it will not accept any input; why..??

    use Disk Utility and Verify Permisions then fix and Verify Disk and fix, this should fix it.

  • My 3GS will not accept my correct password and user name to start using the Cloud.  It just spins while "verifying."

    My 3GS will not accept my correct password and user name to start using the Cloud.  It just spins while "verifying." How can I make it stop so I can activate iCloud ?

    try using @me.com instead of your service address, i mean hotmail or yahoo or else, thanks.

  • HT204088 When trying to update my credit account information, it will not accept the month of experation even though it has been entered. I shut the phone down and tried again, I sync it to the computer. Will not work.  What do I do?

    I was trying to add and app to my iphone and was not able to do so.  It wanted updated credit information.  So, I entered it and it will not accept the month of experation. I have shut the phone down, sync it to the computer to update.  Will not work.  What can I do to continue?

    Off the top I dont thing its good practice to post an email address here
    I dont see how a google password change would impact on ur Apple ID/iTunes account
    Have u access to the old email address? If not and you fail the apple security process then you need to call them
    Have u tried  to manage ur apple id from :  appleid.apple.com

  • HT204053 Icloud says my Apple Id is valid but it will not accept it to access Icloud

    Icloud says my Apple Id is valid but it will not accept it to access Icloud

    If the messages says that it is a valid Apple ID but not an iCloud ID, it's becaure you are trying to create an iCloud account on a PC.  You can only create the account on an iOS device or Mac (running Lion or Mountain Lion).  After creating the account, you can then sign in with the ID on your PC, but you can't create the account on a PC.

  • When I want receive emails it will not accept my username or password yet when I go to google mail my passwords are accepted

    A few weeks ago my ipad lost all the data for using emails like there is no files to put my emails and it will not accept my username or password yet google mail (gmail) will can someone give me some advice please

    Thank you; this has worked.
    Regards

  • WET54G v3.1 Will not accept the default password for web setup

    The setup:
    1 2WIRE wireless router for AT&T DSL connection
    1 wireless laptop, online and good to go
    1 desktop, too far from router to connect with an ethernet cable, this computer does not have wi-fi
    1 new WET54G v3.1, trying to setup as a wireless-ethernet bridge to get the wired desktop on the network and online
    I have set up the desktop with static IP: 192.168.1.1; Subnet 255.255.255.0; Gateway 192.168.1.226.  The WET54G is directly connected to the desktop.  I open Internet Explorer and go to 192.168.1.226.  After entering the password "admin" and leaving the username blank, the login prompt simply reappears as if the password is incorrect.  I have reset the WET54G to factory defaults numerous times (held the reset button for over 30 seconds).  It simply will not accept the password.
    Any suggestions?  I tried live chat but the chat window was so slow and buggy that both times it seemed we were about to make progress the window would freeze up or refresh entirely and disconnect me.  Extremely frustrating to say the least.
    Thanks,
    Sean

    Hi brickmonkey, 
    Sorry for taking so long to get back on this.  We left for a long vacation and I got ridiculously busy when we got back.  ANyway I just spent some time working on this and wanted to report back.  Still didn't get it to work.
    Got into the 2Wire and wrote down it's settings:
    Router Address: 192.168.1.254
    Subnet Mask: 255.255.255.0
    Default Gateway: (???) I did not see this under the summary page, but it was on the internet connection details page., it's a 151.x.x.x number, which the WET54G was not happy to accept as the default gateway.  It gave me the error "DUT and Gateway cannot locate in different subnet."  Also, on that internet connection details page, an additional subnet mask of 255.255.255.255 was listed, but I'm guessing 255.255.255.0 is the correct one to use, right?
    Because it wouldn't accept that 151.x.x.x address, I can't get any farther.  I did notice when setting up the SSID and security to match that of the 2WIRE, the channel was fixed at 6 and the dropdown was disabled.  I changed the 2WIRE from 1 to 6 in case that was an issue.  The WET54G is in Infrastructure mode, as the guide you linked to indicated.
    Any thoughts with this new info?
    Thanks again for your help with this,
    Sean

  • My mid 2010 MacBook Pro 15 inch unibody battery will not accept a charge

    HI there one and all!
                                        My mid 2010 MacBook Pro 15" unibody laptop will not accept a normal charge using the mag safe cord. I have replaced the original battery with a factory new replacement, but I still have the same results.
        The computer powers up and runs only with the mag safe cord attached and when shut down, does not switch from green to orange to indicate the charging mode.
        Can anyone be of assistance or perhaps has had a similar issue? Thanks in advance to anyone for their insight and help. If it makes a difference, my computer information is as follows: MacBook Pro 15", Mid 2010
                                            Processor 2.66 GHz Intel Core i7
                                            Memory.    4 GB 1067 MHz DDR3
                                            Graphics.  Intel HD Graphics 288 MB
                                            Serial number. W80---------------
                                            Software     OS X 10.9.4 (13E28)

    Please find "System Information" in this folder path---Applications > Utilities---and launch it. When it opens, find "Power" in the left-hand contents pane and click it to get something like this in teh main pane:
    Copy everything in the "Battery Information" and copy/paste it here. The number values in that report may help us diagnose what is happening.
    Also, did you buy this battery directly from Apple or from another source. There are an increasing number of reports showing up that suggests some counterfeit batteries being sold.

  • I am having ongoing connection problems with the Clash of Clans app which means that I lose battles, resources or boost times. This results in a loss of gems which I have purchased but will not be refunded as they will not accept responsibility.

    Whilst playing Clash of Clans I will continually lose the internet connection. This means that I lose battles, resources, gold etc and lose boost times. I have informed Supercell who blame my internet connection even though the iPhone, laptop and TV all work fine so it is obviously a technical problem with their game and probably something to do with their last updates.
    As I have purchased gems I feel that I should be compensated for my loss but they will not accept responsibility nor investigate the technical issue. The loss of connection occurs constantly with the game often freezing during replays or searching for battles. This is obviously not a connection issue.
    What suggestions do you have to resolve this situation?

    Hi.
    Thanks for the reply. I asked because I also wanted to see if others had encountered the same problem.
    I have no problems with my internet connection as I run my TV, laptop and iPhone off the same connection with no problems. I believe that since the recent updates to the game this has caused the problem. The game often freezes, cancels out or returns me to the main game screen during battles or replays.
    What I want to know is how do I get the game designers or owners to acknowledge my problem as at this time they keep telling me it is my internet that is a problem and not their game. How do they know this when they refuse to investigate. What can I do and who do I go to for support if they won't accept responsibility?
    I am very grateful to you for replying but concerned that if this can happen to me then how many other gamers are losing out and paying for something that they are not going to receive.
    Many thanks.

  • Terminal window blinking cursor will not accept keyboard entry

    Have SunBlade100 w/ Solaris8.
    This is probably a dumb beginner question...
    When I enter certain commands at the terminal window - in this particular case
    # cat /dev/cua/a
    and I hit <return> the cursor skips to the next line, and
    continues blinking , and will not accept any keyboard entries.
    1. What is the significance of this? Is the cursor waiting further action, and if so, what?
    2. How do I get back to the prompt?
    3. Under this condition, is it safe to exit the terminal window by closing from the Window menu? (I can't type "exit" because the cursor won't accept keyboard entries, and Help for "closing the terminal" warns against closing from the Window menu because any background processes will not be terminated (and this may cause problems).
    Thanks in advance for any info on this.

    Thanks again for the info. <control>+C was exactly what I was looking for. It's coming back to me now-- the last time I had contact w/ UNIX was back in '85 at UC Berkeley (no GUI's back then!).
    I'm assuming that <control>+C is a graceful (i.e. relatively harmless way to exit the command.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • We have 2 itouchs, we a separate itunes account for each one. We have one home computer to use them both on for syc and icloud, the icloud will not accept the 2 accounts?

    we have 2 itouchs, we a separate itunes account for each one. We have one home computer to use them both on for sync and icloud, the icloud will not accept the 2 accounts?

    Do you know what happens if you delete the icloud account from an iphone 4s?  Will it delete the pictures, documents, etc. from the phone, or just unlink the icloud from the phone?  I want to associate a different icloud account to the phone.

  • I have an ipad2 with wifi and 3G.  My wife and I are traveling in France (Nice) then into Italy.  We are unable to purchase a data plan because our Verizon IPad will not accept a sims chip...we are told.  We were advised that this model wound work in Euro

    I have an ipad2 with wifi and 3G.  My wife and I are traveling in France (Nice) then into Italy.  We are unable to purchase a data plan because our Verizon IPad will not accept a sim chip...we are told.  An Apple store employee here said this model is good only in the US. The iPads here take a sim card. We were advised by an Apple Store Employee at home that this model would work in Europe and that we could buy our service here.  That does not seem to be the case.    We have been told that we must invest in a modem at 200.00€ and then purchase a separate service plan for each country. We can use the free wifi wherever it is available but we cannot connect to the outside world when out of range. Is there anything else we can do?
    Thanks, John

    Unfortunately, no other solution is available.
    Hope this helps

Maybe you are looking for

  • Why can't my buddy see my Video?

    I am running iChat 3.0.1 on Tiger & I am chatting with someone using iChat 2.1 on Panther..... My camera is working fine, but the person I am chatting with has no way to see my video.... We are able to hear each other perfectly using iChat audio, but

  • Two weeks into owning my iMac and I trashed a bunch of files. I see "recovery" software advertised. Anyone know anything that would be helpful?

    I'm embarrassed to admit somehow emptied my trash with hundreds of files. I   see on the web "recovery" software advertised. I don't dare pursue until I'm sure it's safe. In all the years using a PC I never did such a stupid thing. All the data lost

  • Importing issues with FCPX 10.1.4

    While trying to import video in FCPX (quicktime shot on the GY HM 100U) when the import window closes the clips are displayed as Missing Proxy in the event? I work on 4 other macs running the same software and cannot duplicate this problem. They all

  • SQL selecting group by but....

    select count(empno) as total,dept from emp group by dept total | dept 4 | 10 3 | 20 5 | 30 i want an another field with this to give me like this employee_ _ Number|total | dept 121,122,123,124_ _ | 4 | 10 125,126,127_ _ _ _ | 3 | 20 129,130,131,132,

  • After migrated to sp2013 library icon still use from 2007.

    I've migrated SharePoint from 2007 to 2013 (2007 -> 2010 -> 2013) with database attached method. After upgrade I found that the library and list application icon are still 2007 image. How can I change or upgrade all functional to 2013? Please help.