Is it possible to create indexes & use them on xml docs with namespaces?

I have put an XML doc in a BDBXML container which looks like this:
*<ns1:note xmlns:ns1="http://www.testsch.org/ns">*
*<ns1:to>Eric</ns1:to>*
*<ns1:from>Brendan</ns1:from>*
*<ns1:msg>How r u?</ns1:msg>*
*</ns1:note>*
Now, I am creating an index on the element "to", as:
addIndex "ns1" "to" node-element-equality-string
Though the index has been shown as getting created using the listIndexes command, if I lookup that index with the following command:
lookupIndex node-element-equality-string "ns1" "to"
the output is:
*0 objects returned for eager index lookup 'node-element-equality-string'*
Whereas, if I do the whole procedure without the namespaces in the document & the commands, the result is fine:
*1 object returned for eager index lookup 'node-element-equality-string'*
Can someone please tell me whether using namespaces, the indexes can be created or not? If yes, how?
Thanks,
Dev
Edited by: user11871332 on Sep 7, 2009 3:53 PM

Hi Dev,
When using XML, the prefix for the namespace is really just syntactic sugar. The actual namespace in your example is "http://www.testsch.org/ns", and that's the value that you need to use when creating your index:
addIndex "http://www.testsch.org/ns" "to" node-element-equality-stringJohn

Similar Messages

  • Is it NOT possible to create indexes on views using SSMS?

    I'm looking at:
    http://www.mssqltips.com/sqlservertip/1610/sql-server-schema-binding-and-indexed-views/
    The thing is I'm not able to find that index dialogue ANYWHERE. When I google I keep coming up with examples of how to create indexes using TSQL. Is there no way to create an index on an view with SSMS?
    Using SQL Server 2008 R2.

    Expand Views -> expand view -> right click Indexes - > new index

  • How to create indexes using CREATE TABLE statement

    Hi,
    Can anyone please tell me how to create indexes using CREATE TABLE staement? This point is part SQL Expert exam (1Z0-047) and please guide me to use which books for this particular exam.
    Thanks in advance.

    Can anyone please tell me how to create indexes using CREATE TABLE staement?e.g. creating a primary key or a unique constraint will generate indexes along with the create table syntax:
    SQL> create table t (a integer primary key, b integer unique)
    Table created.
    SQL> select   index_name, index_type, uniqueness
      from   user_indexes
    where   table_name = 'T'
    INDEX_NAME                     INDEX_TYPE                  UNIQUENES
    SYS_C0016575                   NORMAL                      UNIQUE  
    SYS_C0016574                   NORMAL                      UNIQUE  
    2 rows selected.

  • Is is possible to create Socket using Java Stored Procedures/Function(Ora)?

    Hello Friends,
    Is is possible to create Socket using Java Stored Procedures/Function in Oracle?
    OR
    How I can send a message from oracle to Java Desktop Application which is working like server program?
    Please Guide !!

    J3Ganesh wrote:
    Hello Friends,
    Is is possible to create Socket using Java Stored Procedures/Function in Oracle?No, Oracle was very careful to take that feature out of the JDK provided in Oracle 10/11, but you can buy that feature back for, if I remember correctly, about 5000 dollars. (I actually raised a service request on this and then told my rep what I thought about the answer I received--some thing along the line of money grubbing so and so....)
    How I can send a message from oracle to Java Desktop Application which is working like server program?You can make a table and poll it from time to time from the Java side and write and commit what ever you want to the table. I do not know any way to send a signal from Oracle DB an external Java application--Java or PL/SQL stored procedure.

  • Using XSLT to extract value of a XML node with namespace

    I have a XML source code here.
    <?xml version="1.0" encoding="utf-8" ?>
    <rss version="2.0" xmlns:job="http://www.pageuppeople.com">
      <channel>
        <title>SMH Jobs</title>
        <link>internalrecruitment.smhgroup.com.au/jobsrss.ashx?stp=di</link>
        <description>A listing of jobs available here</description>
        <item>
          <title>eCommerce Optimisation Advisor</title>
          <description>A new and exciting opportunity exists for an experienced eCommerce Advisor to join</description>
          <job:location PUReferenceID="3711">Sydney - Inner Suburbs & CBD</job:location>
        </item>
      </channel>
    </rss>
    I want to use XSLT to extract value of a XML node with namespace <job:location>, and the returned value should be string 'Sydney - Inner Suburbs & CBD'. I tried a few XSL code below, but failed with error or nothing was returned.
    <xsl:value-of select="job:location" disable-output-escaping="yes"/>
    <xsl:value-of select="job/location" disable-output-escaping="yes"/>
    <xsl:value-of select="job\location" disable-output-escaping="yes"/>
    <xsl:value-of select="location" disable-output-escaping="yes"/>
    This might be an easy question for you, but I would appreciate if anyone can help.

    Hi Suncorp IT Learner,
    We need to tell the XSLT that some elements are in another namespace. Copy the xmls declarations for the prefixes you need to use. Then use the xsl format as:
    <xsl: value-of select=”job:location/@PUReferenceID”/>
    In following issue, Chriztian has a good explanation:
    http://our.umbraco.org/forum/developers/xslt/33353-XSLT-reading-XML-attribute-value
    Thanks,
    Qiao Wei
    TechNet Community Support

  • Has anybody tried creating and validating a XML doc with XML Schema?

    Hi,
    Has anybody tried creating and validating a XML doc with XML Schema?

    With XMLBeans, an XML document may be created from and validated with an XML schema.

  • Creating index using XMLIndex, changes the result set when querying

    Hi there,
    I was tasked with populating an Oracle 11Gr2 database with data from 800,000 XML files. I used the Oracle documentation, and in about 2 days I had the data loaded into a simple table.
    Queries of this table were SLOW, so this morning I read about using XMLIndex to index the table... I did this, and it works great -- the queries got a LOT faster.
    However -- a "column" from my XML data is supposed to return values of 2000-4000 characters. It worked fine, until I created my index -- after I created the XMLIndex, the data is being truncated to 80 chars in my query.
    CREATE TABLE TEST_XMLTABLE OF XMLType; /* XML data has a "node" called TEXT which can be up to 4000 chars */
    SELECT to_number( extractValue(OBJECT_VALUE, 'newsitem/@itemid')) as ITEM_ID, Text.text <----- value here will contain full text body up to 4k chars
    FROM TEST_XMLTABLE KTX,
    XMLTABLE('/newsitem' PASSING ktx.Object_Value columns "TEXT" clob PATH 'text') TEXT
    /* now create the index */
    CREATE INDEX IDX_xmlindex ON TEST_XMLTABLE (OBJECT_VALUE) INDEXTYPE IS XDB.XMLIndex;
    Now, run my query again, and TEXT.TEXT is truncated to only 80 chars!?!?!
    I'm not sure what to do next... my users need the full text, so for now I have dropped the XMLIndex... the queries are slow, but they are getting all the data.
    Thanks in advance for any help or ideas.
    Keith

    I still do not have an answer back from Oracle, regarding if this is a "bug" or not....
    but for now, I have a "workaround" that seems to fix the problem. After I create the XMLIndex, I can remove the troublesome "path" from the index by doing an index rebuild, as shown:
    ALTER INDEX IDX_xmlindex REBUILD PARAMETERS ('PATHS (EXCLUDE ADD (/newsitem/text))');
    After I rebulld the index, I get all the chars in my TEXT node properly. However, the performance of the queries is noticably slower than before I did the ALTER INDEX.. albeit still faster than with no index at all.

  • Is it possible to create a shortcut for current time / date with iPhone native apps?

    is it possible to create a shortcut to insert the current time / date in a text such as a Note with iPhone (IOS 6) native apps (not a 3rd. party app)?
    By "shortcut" I mean a combination of characters, the same as under settings/general/keyboards/shortcuts.
    thanks.

    Code that does it is here:
    http://forum.java.sun.com/thread.jsp?forum=48&thread=453846&tstart=0&trange=15
    MOD

  • Create XML docs with hierarchy of tags and attr defined in databaste tables

    Hi,
    My problem is a little unique one. I want the ability to define the structure of the XML document (i.e. the hierarchy of element tags and attribute names) in the database tables. The values of tags and attributes will also be populated at runtime in tables.
    Then write some generic API that reads the structure of the XML document through the database tables and spits out an XML document based on this structure and values stored in the tables.
    So, basically, I want the tag names and values both to be values in the database rather than the tag names being the columns in database tables.
    With this I should be able to have one procedure/function that can serve the purpose of creating XML documents with different structures by just specifying that structure in the form of database tables.
    Almost all the Oracle XML utilities I read about, create XML docs based on a SQL query with tag names being columns in the database tables. Any help will be highly appreciated.
    Thanks,
    Monika

    Which database release are you using...
    The computed constructors feature of XQuery may help.
    -Mark

  • Embedding inline HTML data in XML using the mx:XML tag with &lt; and &gt;

    What is best practice for embedding HTML within the
    <mx:XML> tag? Programmatically, I can implement this
    successfully:
    [Bindable]
    public var xmlDP:XML = <component data="&lt;" />;
    However, I get the following error if I try to store the same
    data inline in an mx:XML tag, as such:
    <mx:XML id="xmlDP">
    <component data="&lt;" />
    </mx:XML>
    Error #1095: XML parser failure: Unterminated attribute.
    If I change the MXML tag as follows, it works fine:
    <mx:XML id="xmlDP">
    <component data="&amp;lt;" />
    </mx:XML>
    Unfortunately, I also can not source the mx:XML tag to an XML
    file which uses &lt; or &gt; codes, as it yields the same
    results. This leads me to believe that the <mx:XML> tag does
    not support the special character codes for < and >, but why?
    Incidentally, this code also gives a 1095 error:
    <mx:XML id="xmlDP">
    <component data="&#0060;" />
    </mx:XML>
    This is causing an issue with my source data as it is not
    hand typed into Flex, and standard XML supports the &lt; and
    &gt; codes. I have tried a full HTML string, as shown below,
    but this also generates the error:
    <mx:XML id="xmlDP">
    <component data="&lt;b&gt;Test&lt;/b&gt;"
    />
    </mx:XML>
    Many thanks for any input you may have!

    I’m generating the XML source file with
    Microsoft’s XML Notepad 2007. It will encode invalid special
    characters automatically. My understanding is that this is the
    proper way to handle the less than symbol in a XML string, that is
    to say using the &lt; code.
    With respect to the escape and un-escape methods, I am able
    to successfully implement these in AS, but not in MXML. This makes
    sense considering they are AS methods, but I was hoping to be able
    to do something like:
    <mx:XML id="xmlDP">
    <component data="escape('<');" />
    </mx:XML>
    This gives the following compilation error:
    The value of attribute "data" must not contain the '<'
    character.
    As does using the escape character as such:
    <mx:XML id="xmlDP">
    <component data="\<" />
    </mx:XML>
    Below is an example of what the escape character may be used
    for in AS:
    var myString:String = "\"";
    trace(myString);
    // result: "
    Likewise, I can escape the < character as such:
    var myString:String = escape("<");
    trace(myString);
    // result: %3C
    <mx:XML id="xmlDP">
    <component data="%3C" />
    </mx:XML>
    trace(un-escape(xmlDP.@data));
    // result: <
    As you can see, using %3C and unescaping in AS will yield the
    correct result; however, this is not a practical method of
    representing the data in MXML as I would have to write an AS method
    to un-escape the XML string anyway, so I might as well just store
    the data in AS to begin with. I was hoping for a way to source an
    mx:XML object, without having to load it into ActionScript
    manually. Here’s an example of the functionality I would
    expect:
    <mx:XML id="xmlDP">
    <component data="&gt;" />
    </mx:XML>
    trace(xmlDP.@data);
    // result: >
    Only this does not work for the less than symbol. I’m
    assuming at this point that this is a bug in the Flex compiler.
    Thanks again for your help troubleshooting this one!

  • I've just bought a few apps for the iPad, is it possible to download and use them for the Mac?

    Hi, I knew that all apps after buying them could be downoad to other Apple's devices. The last week I bought Keynote for the iPad and I need for my Mac too, but I don't know why I can't download it. Shoul I buy Keynote for the Mac too? Is the same with other apps?

    Applications are designed for either iOS or OSX.  You must buy a version for each type of OS.  But you can share that app among all like devices (iPad/iPhone and iMac/MBP/Macmini)

  • Can I create and use 2 PKCS11 Providers, each with different config?

    Here is the code I am running twice with different configFilePaths:
         setNssProvider(new SunPKCS11(getConfigFilePath()));
         Security.addProvider(nssProvider);
         Security.removeProvider("SunJSSE");
         Provider jsse = new com.sun.net.ssl.internal.ssl.Provider(nssProvider);
         Security.addProvider(jsse);
         keyStore = KeyStore.getInstance("PKCS11", nss);
         keyStore.load(null, ksParams.getKeyStorePassword().toCharArray());
    I am getting a ProviderException, presumable where I create the SunPKCS11 instance:
         ProviderException: Secmod directory c:\nss\fips2db invalid, NSS already initialized with c:\nss\fips1db
    Is it possible to run two PKCS11 Providers, with different configs, in the same address space?
    Thank you,
    Rob

    reefedjib wrote:
    Is there anyone else who could comment on my problem, here? I am really hoping that someone can point me to a solution.I realized I was using the same name in the config files. I changed it to be different and the same result is occurring.
    ProviderException: Secmod directory c:\nss\fips2db invalid, NSS already initialized with c:\nss\fips1dbHere are my two config files:
    name = NSSfips1
    nssLibraryDirectory = c:\nss\lib
    nssSecmodDirectory = c:\nss\fips1db
    nssModule = fips
    name = NSSfips2
    nssLibraryDirectory = c:\nss\lib
    nssSecmodDirectory = c:\nss\fips2db
    nssModule = fipsAny word on this?
    Thanks

  • Possible conflict/problem if using edk 5.2.0 with plumtree portal 5-0-3 and collaboration v4.0.1?

    Hi,
    We are using plumtree portal v5-0-3 and collaboration v-4.0.1. I have to create a portlet where users can use it to submit a request for a collaboration project to be created. Searching through Plumtree Developer Center, there are documents that show me how to create a collaboration project using edk library. The edk that comes with plumtree portal v5-0-3 doesn't contain the api(s) that I need (for example, com.plumtree.remote.prc.collaboration.project.*). However, the edk 5.2.0 does contain these api(s).
    Are there any possible conflicts/problems if I use the edk 5.2.0 with our existing plumtree portal v5-0-3 and collaboration v4.0.1? If there are, is there any other way that I could get to these api(s) somehow to create collaboration projects?
    Thank you in advance for helping!

    Thank you so much for responding so quickly!
    Is there any api or way that I could use to create a collaboration project without using the Project Explorer? In our scenario, after a user uses the portlet that I describe earlier in the original disscussion message to request the creation of a project, an admin will take a look at the request and click a button to have the project created. This button will somehow trigger some scripts or codes instead of the admin using the Project Explorer to create the project.
    Thanks again for your help!

  • Only the last account is created when using this script in combination with a CSV

    Hi, I've got a weird problem when using this script:
    $Users = Import-Csv -Delimiter ";" -Path "......csv"  
    FOREACH ($User in $UserList) { $ User }
        $OU = $User.path
        $UPN = $User.UPN
        $Password = $User.password 
        $Detailedname = $User.firstname + " " + $User.Lastname 
        $UserFirstname = $User.Firstname 
        $FirstLetterFirstname = $UserFirstname.substring(0,1) 
        $SAM =  $User.UPN
        $Company = $User.company
        $Description = $User.description
        $AccountExpirationDate = $User.accountexpirationdate
    $params = @{ 'Name'=$Detailedname;
                 'SamAccountName'=$SAM;
                 'UserPrincipalName'=$SAM;
                 'DisplayName'=$Detailedname;
                 'GivenName'=$UserFirstname;
                 'Surname'=$User.Lastname;
                 'AccountPassword'=(ConvertTo-SecureString $Password -AsPlainText -Force);
                 'Enabled'=$True;
                 'PasswordNeverExpires'=$True;
                 'Path'=$OU;
                 'Company'=$Company;
                 'Description'=$Description;
                 'AccountExpirationDate'=$AccountExpirationDate }
    New-ADUser @params
    The CSV file has columns with the name: Lastname;Firstname;Password;Company;Description;UPN;path;AccountExpirationDate
    Script runs without errors, but only creates the last line in the CSV file. Anyone that can help me, of put me in the right direction? Should be great!
    Michiel
    the Netherlands

    Hi Michiel,
    You'll need to move $params and New-ADUser up into the foreach loop.
    EDIT: Also, remove the { $ User } that you have next to the foreach loop. You're also using $Users instead of $UserList.
    EDIT2: Here's a cleaned up version:
    $UserList = Import-Csv -Delimiter ";" -Path "......csv"
    FOREACH ($User in $UserList) {
    $OU = $User.path
    $UPN = $User.UPN
    $Password = $User.password
    $Detailedname = $User.firstname + " " + $User.Lastname
    $UserFirstname = $User.Firstname
    $FirstLetterFirstname = $UserFirstname.substring(0,1)
    $SAM = $User.UPN
    $Company = $User.company
    $Description = $User.description
    $AccountExpirationDate = $User.accountexpirationdate
    $params = @{ 'Name'=$Detailedname;
    'SamAccountName'=$SAM;
    'UserPrincipalName'=$SAM;
    'DisplayName'=$Detailedname;
    'GivenName'=$UserFirstname;
    'Surname'=$User.Lastname;
    'AccountPassword'=(ConvertTo-SecureString $Password -AsPlainText -Force);
    'Enabled'=$True;
    'PasswordNeverExpires'=$True;
    'Path'=$OU;
    'Company'=$Company;
    'Description'=$Description;
    'AccountExpirationDate'=$AccountExpirationDate
    New-ADUser @params
    Don't retire TechNet! -
    (Don't give up yet - 13,085+ strong and growing)

  • Is it possible to creat a Photo Gallery on CD/DVD with downloadable content

    I am looking for a way to create a photo gallery, distribute it via CD or DVD, and have the end user be able to download the photos in the gallery from within the photo gallery. This would function exactly like the iPhoto web galleries, but would be distributed on CD/DVD rather than posted to the web. Is this possible? I am looking for a way for a user to download the photos, in low res and high res, from within a gallery browser.

    It is not a matter of my wanting to overcomplicate things. It is a client request. They want to be able to send out photos of their products on CD/DVD, have the images pop up in a nice looking preview (slideshow) and allow the user to have the ability to download the photos, low res or high res, to their desktop from within the preview (slideshow).
    This is a quite common approach for equipment manufacturers who are trying to simplify the process for their end users.

Maybe you are looking for