LPX-00234: Namespace prefix 'xbrli' is not declared

Hello

with this request


Select updateXML
(
XmlType ("< xbrli:period > < xbrli:StartDate > 1 < / xbrli:StartDate > < xbrli:EndDate > 3 < / xbrli:EndDate > < / xbrli:period > '").
' / xbrli:period / xbrli:StartDate / text () ', 6,' / xbrli:period / xbrli:EndDate / text () ', 7
)
of the double

I becam this error
LPX-00234: Namespace prefix 'xbrli' is not declared

What should I do to fix this error

MDK.

Hello

You try to build an invalid XML.
The namespace prefix must be declared within a top-level element (or at least in the first qualified element):


 
  1
  3
 

Then, with updateXML, you will need to specify the mapping of namespace:

SQL> select xmlserialize(document
  2  updateXML
  3  (
  4  xmltype('
  5  
  6  1
  7  3
  8  
  9  ')
 10  , '/root/xbrli:period/xbrli:StartDate/text()', 6
 11  , '/root/xbrli:period/xbrli:EndDate/text()', 7
 12  , 'xmlns:xbrli="some-namespace-uri"'
 13  )
 14  as clob indent
 15  ) result
 16  from dual;

RESULT
--------------------------------------------------------------------------------

  
    6
    7
  

 

Tags: Database

Similar Questions

  • prefix of the unresolved namespace prefix 'oraext' could not be resolved

    Hi all

    I am compiling my bpel process and it shows me error "pending prefix of the namespace prefix 'oraext' cannot be resolved. I am assigning some values hard-coded so used some string as left-pad functions.
    It was fine, but all of a sudden he started unrecognizing the left-pad function in the expression window.

    Anyone has faced this problem before?

    Concerning
    Yogesh

    Hello

    Namespaces shud be generated automatically... Make sure that xmlns:oraext = "http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc" is defined in the .bpel file.

  • insertChildXML, namespaces and LPX-00234

    Hello to you all XML gurus,.

    If you ask my personal opinion, I find XML namespaces a pain in the ass - again, I have to deal with it.
    On 10.2.0.4.0, I need to insert a new item in an XMLType column with a document that contains multiple namespaces. Here is an example document:
    <?xml version="1.0" encoding="UTF-8"?>
    <PutOrderPurchaseWithDFPIn xmlns="http://www.mysite.de/schemas/myapp/putorderpurchasewithdfpin/">
      <trxId>1234567890</trxId>
      <portfNo>987654321</portfNo>
      <ns3:DocumentsDataIn xmlns:ns3="http://www.mysite.de/schemas/myapp/documentsdatain/">
        <ns3:protocolNo>123456789</ns3:protocolNo>
      </ns3:DocumentsDataIn>
    </PutOrderPurchaseWithDFPIn>
    The goal is to insert a new item "false < ns3:absolutKz > < / ns3:absolutKz > ' in '< ns3:DocumentsDataIn > '.
    Without using the namespace prefix "ns3:"the update already works very well, but the document needs these prefixes. " So I tried this (and many other variations of it):
    UPDATE tmp_uk_xt
       SET req =  
           insertChildXML( req 
                         , '//ns3:DocumentsDataIn' 
                         , 'ns3:absolutKz'
                         , XMLType('<ns3:absolutKz>false</ns3:absolutKz>')
                         , 'xmlns:ns3="http://www.mysite.de/schemas/myapp/documentsdatain/"' )
    Which generates in turn:
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00234: namespace prefix "ns3" is not declared
    Error at line 1
    ORA-06512: at "SYS.XMLTYPE", line 301
    ORA-06512: at line 1
    Perhaps I missed something, but after trying hours RTFMing and search on Google, I'm still stuck.
    BTW, this also applies to the appendChildXML.

    What I also tried without success:
    UPDATE tmp_uk_xt
       SET req =  
           insertChildXML( req 
                         , '//ns3:DocumentsDataIn' 
                         , 'absolutKz'
                         , XMLType('<ns3:absolutKz>false</ns3:absolutKz>')
                         , 'xmlns:ns3="http://www.mysite.de/schemas/myapp/documentsdatain/"' )
    and
    UPDATE tmp_uk_xt
       SET req =  
           insertChildXML( req 
                         , '//ns3:DocumentsDataIn' 
                         , 'ns3:absolutKz'
                         , XMLType('<ns3:absolutKz>false</ns3:absolutKz>', 'xmlns:ns3="http://www.mysite.de/schemas/myapp/documentsdatain/"' )
                         , 'xmlns:ns3="http://www.mysite.de/schemas/myapp/documentsdatain/"' )
    So, someone who has an idea?

    Published by: ora_et_labora on February 17, 2010 17:06

    Well, to finally answer myself: what I needed was an independent operation space of names, but it is not supported in 10g. Of 11.1, Xpath 2.0 (draft) is implemented, this way you can operate with wildcards for namespaces (not completely sure, but found that here: http://download.oracle.com/docs/cd/E12839_01/appdev.1111/b28394/adx_ref_standards.htm).
    Thanks for your ideas, people!
    Uwe

  • How to add an element with a namespace prefix.

    I have a very simple problem, but I think I go about it the wrong way.

    I have the following variable of XMLTYPE in pl/sql:

    <A xmlns="namespace" xmlns:def="myns_namespace">
         <B/>
    </A>
    

    In a separate step, I would like to add the following after B: element

    <C attr="attribute" def:defattr="def_attribute"/>
    

    To produce the following XML:

    <A xmlns="namespace" xmlns:def="myns_namespace">
         <B/>
         <C attr="attribute" def:defattr="def_attribute"/>
    </A>
    

    What is the best way to do it?  I tried the following:

    1. the following statement fails because when you create the item C, oracle complains "prefix 'def' is not declared."  It's logical.

    SELECT
    insertChildXML(
         eltA,
         '/A/B',
         'C',
         xmlElement("C", xmlAttributes('attribute' "attr", 'def:defattr' "def_attribute")),
         'xmlns="namespace" xmlns:def="myns_namespace"'
    )
    INTO ...
    

    2. I also tried to create C element with namespace attributes before adding to the element and then removing the namespace declaration attributes using deleteXML.  This does not apparently the function can remove attributes, but it cannot remove namespace declarations. I try to avoid ending up with this:

    <A xmlns="namespace" xmlns:def="myns_namespace">
         <B/>
         <C xmlns="namespace" xmlns:def="myns_namespace" attr="attribute" def:defattr="def_attribute"/>
    </A>
    

    I was hoping to find a function that could be one of the following:

    1 create fragments of the element, ignoring prefixes to namespace and does not throw an error.

    2 remove the specific namespace declarations, or any statement redundant namespace.

    3. Add a child element otherwise wherein the child element would not need to be created and validated independently before being added to the parent.

    4 maybe I treat everything the wrong way and need to rethink my strategy on this xml creation?

    You will have to do it in two steps in order to avoid the redeclaration of namespace at the level of the child:

    SQL > SELECT xmlserialize (document

    (2 insertchildxml)

    (3 appendChildXML)

    4 xmltype ("")

    5             , '/A'

    6, xmlelement ("C", xmlattributes ('attribute' is "attr"))

    7, 'xmlns = "namespace" '

    8             )

    9           , '/A/C'

    10, ' @def: attribute '

    11, "def_attribute".

    "12, ' xmlns ="namespace"xmlns:def ="myns_namespace""

    13           )

    14 indent

    15         )

    16 DOUBLE;

    XMLSERIALIZE (DOCUMENTINSERTCHI

    --------------------------------------------------------------------------------

  • namespace prefix used xdofx but not declared

    Hi, I'm looking for the following code into a field that triggers the namespace prefix used xdofx error but not said ":"

    <? choose:? > <? When: xdofx:to_number(substr(DateofSignature,12,2)) > 11? > PM <? otherwise:? > AM <? end otherwise? > <? end when? > <? end to choose? >


    The DateofSignature format is dd/mm/yyyy hh: mm: and I am trying to display AM/PM at the end depending on whether the time is greater than 11.

    Any ideas?

    Thank you

    You can use this to get the desired result: 11? > PMAM

    -a few things to note in your syntax:
    must be before the contrary clause

    Hope that helps.

  • another namespace issue? 'CameraSettings' was not declared in this scope

    I have a camera native c ++ application coded and run successfully.

    I want to change the flash mode.  So I add:

    CameraSettings* cameraSettings = new CameraSettings();
     cameraSettings->setFlashMode(CameraFlashMode::Light);
     camera->applySettings(cameraSettings);
    

    I also add:

    #include 
    #include 
    

    When I build, I get the error:

    'CameraSettings' was not declared in this scope.

    Is it a matter of namespace or a:

    LIBS += ?
    

    ... question?

    Something else?

    My current LIBS:

    LIBS += -lcamapi -lscreen
    

    I see what is happening, I mix with QT c functions.

    I need to use the settings as shown in this example:

    http://supportforums.BlackBerry.com/T5/native-development/Flash-always-on-camera/m-p/1911403/HIGHLIG...

    Thanks for your help.

  • WARN [main] (SimpleLog.java:79) - could not set the namespace prefix

    I use the Jena adapter to load the .owl file a bit, and I get warnings about namespace prefixes is not found. The data appear to load correctly, so I don't know why this is a problem. Maybe I need to tweek the syntax of .owl a little. I'd be happy to just disable it if I can. Here's a sample:

    WARN [main] (SimpleLog.java:79) - couldn't set namespace prefix rdf
    java.sql.SQLException: ORA-00942: table or view does not exist

    at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:74)
    at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:110)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:171)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
    at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1030)
    at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:194)
    at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:947)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1222)
    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3381)
    at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3482)
    at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1085)
    at oracle.spatial.rdf.client.jena.Oracle.executeSQL(Oracle.java:354)
    at oracle.spatial.rdf.client.jena.OraclePrefixMapping.setNamespacePrefix(OraclePrefixMapping.java:195)
    at oracle.spatial.rdf.client.jena.OraclePrefixMapping.setNsPrefix(OraclePrefixMapping.java:215)
    at com.hp.hpl.jena.rdf.arp.JenaHandler.startPrefixMapping(JenaHandler.java:94)
    at com.hp.hpl.jena.rdf.arp.impl.XMLHandler.startPrefixMapping(XMLHandler.java:108)
    at org.apache.xerces.parsers.AbstractSAXParser.startNamespaceMapping (unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.startElement (unknown Source)
    at org.apache.xerces.impl.XMLNamespaceBinder.handleStartElement (unknown Source)
    at org.apache.xerces.impl.XMLNamespaceBinder.startElement (unknown Source)
    at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement (unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement (unknown Source)
    to org.apache.xerces.impl.XMLDocumentScannerImpl$ ContentDispatcher.scanRootElementHook (unknown Source)
    to org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$ FragmentContentDispatcher.dispatch (unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument (unknown Source)
    at org.apache.xerces.parsers.DTDConfiguration.parse (unknown Source)
    at org.apache.xerces.parsers.DTDConfiguration.parse (unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse (unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.parse (unknown Source)
    at com.hp.hpl.jena.rdf.arp.impl.RDFXMLParser.parse(RDFXMLParser.java:106)
    at com.hp.hpl.jena.rdf.arp.JenaReader.read(JenaReader.java:215)
    at com.hp.hpl.jena.rdf.arp.JenaReader.read(JenaReader.java:202)
    at com.hp.hpl.jena.rdf.arp.JenaReader.read(JenaReader.java:272)
    at com.hp.hpl.jena.rdf.arp.JenaReader.read(JenaReader.java:99)
    at com.hp.hpl.jena.rdf.model.impl.ModelCom.read(ModelCom.java:186)
    at com.harris.iis.discovery.jenaPrototype.OracleRDF.loadOntology(OracleRDF.java:94)
    at com.harris.iis.discovery.jenaPrototype.Main.main(Main.java:81)

    Why not try a new model name? You don't need to explicitly call create_rdf_model (or create_sem_model).

    This table of prefixes to namespace stores the namespace prefix mapping. TopBraid composer
    is based on this table. Behind the scenes, OraclePrefixMapping extends PrefixMappingImpl of Jena.

    The current logic to create those underlying tables is that if there is no such thing as a model, then
    all relevant tables will be created automatically. Otherwise, create the table will be ignored.

    It will be useful,

    Zhe Wu

  • error "Ibsta" no was not declared in this scope

    I have a "error: 'Ibsta' was not declared in this scope."

    I try to program with C++ and GPIB test equipments, but so far, I have this problem.

    I'm sorry, but my knowledge of C++ is very limited because I took a module on it for about 4 months in College and now I have to rectify emergency for my project. Any help would be much apprciated, I tried searching the forums, but I still have to find an answer. I think it has something to do with my linker. BTW, I use Code blocks to compile program, so it may be different from other IDEs posted here such as Microsoft Visual C++, Borland, Dev C++.

    The program that I write to you is as follows:

    #include
    #include "ni488.h".
    #include
    #include
    #include "Decl. - 32.h"
    #include

    using namespace std;

    void GpibError (const char * msg); / * Function to Error statement * /.

    Device int = 0; / * Peripheral device descriptor * /.
    int BoardIndex = 0; / * Interface index (GPIB0 = 0, GPIB1 = 1, etc..) * /.

    int main() {}
    int PrimaryAddress = 28; / * Main unit address * /.
    int SecondaryAddress = 0; / * Secondary unit address * /.
    char Buffer [101]; / * Read buffer * /.

    /*****************************************************************************
    * Boot - made only once at the beginning of your application.
    *****************************************************************************/

    Device = ibdev (/ * create a device descriptor pointer * /)
    BoardIndex, / * Board Index (GPIB0 = 0, GPIB1 = 1,...) * /.
    PrimaryAddress, / * address of the primary device * /.
    SecondaryAddress, / * peripheral secondary address * /.
    T10s, / * delay (T10s = 10 seconds) option * /.
    1, / * line EOI assert at the end of writing * /.
    (0); / * Mode of termination EOS * /.
    If (Ibsta() & ERR) {/ * find GPIB error * /}
    GpibError ("ibdev Error");
    }

    ibclr (Device); / * System * /.
    If {(Ibsta() & ERR)
    GpibError ("ibclr Error");
    }

    /*****************************************************************************
    * Body - writing the majority of your GPIB application code here.
    *****************************************************************************/

    ibwrt (device, "* IDN?", 5 "); / * Send the command ID of the query * /.
    If {(Ibsta() & ERR)
    GpibError ("ibwrt Error");
    }

    Bird (device, buffer, 100); / * Read up to 100 bytes of the device * /.
    If {(Ibsta() & ERR)
    GpibError ("Bird error");
    }

    Buffer [Ibcnt ()] = '\0 '; / * Null terminate the string ASCII * /.

    printf ("%s\n", buffer); / * Print the device identification * /.

    /*****************************************************************************
    * UN-initialize - done only once at the end of your application.
    *****************************************************************************/

    ibonl (device, 0); / * Turn off the line * /.
    If {(Ibsta() & ERR)
    GpibError ("ibonl Error");
    }

    }

    /*****************************************************************************
    * Function GPIBERROR
    * This function will warn you that a function of NOR-488 failed by
    * a print error message. The State IBSTA variable will also be
    * printed in hexadecimal with the senses mnemonic of the forest
    * position. The State IBERR variable will be printed in decimal form
    * with the mnemonic significance of the decimal value. The status
    * Variable IBCNT will be printed in decimal form.
    *
    * The NOR-488 IBONL function is called to turn off the equipment and
    * software.
    *
    OUTPUT Comptrollership will end this program.
    *****************************************************************************/
    void GpibError (const char * msg) {}

    printf ("%s\n", msg);

    printf ("Ibsta () = 0 x %x<",>
    If (Ibsta() & ERR) printf ("ERR");
    If (Ibsta() & TIMO) printf ("TIMO");
    If (Ibsta() & END) printf ("END");
    If (Ibsta() & SRQI) printf ("SRQI");
    If (Ibsta() & RQS) printf ("QR");
    If (Ibsta() & CMPL) printf ("CMPL");
    If (Ibsta() & LOK) printf ("LOK");
    If (Ibsta() & REM) printf ("REM");
    If (Ibsta() & CIC) printf ("CIC");
    If (Ibsta() & ATN) printf ("ATN");
    If (Ibsta() & TAC) printf ("TAC");
    If (Ibsta() & MFP) printf ("LAKES");
    If (Ibsta() & CDI) printf ("CDI");
    If (Ibsta() & DCAS) printf ("DCAS");
    printf ("" > \n ");

    printf ("Iberr() = %d", Iberr() ");
    If (Iberr() == EDVR) printf ("EDVR \n");
    If (Iberr() == ECIC) printf ("in ECIC \n");
    If (Iberr() == ENOL) printf ("ENOL \n");
    If (Iberr() == EADR) printf ("EADR

    \n");

    If (Iberr() == HELLO) printf ("the GRAE \n");
    If (Iberr() == ESAC) printf ("ALD \n");
    If (Iberr() == EABO) printf ("EABO \n");
    If (Iberr() == ENEB) printf ("ENEB \n");
    If (Iberr() == PAES) printf ("PAES \n");
    If (Iberr() == ECAP) printf ("ECAP \n");
    If (Iberr() == EFSO) printf ("EFSO \n");
    If (Iberr() == USBE) printf ("USBE \n");
    If (Iberr() == ESTB) printf ("ESTB \n");
    If (Iberr() == ESRQ) printf ("ESRQ \n");
    If (Iberr() == XTAB) printf ("Established\n");
    If (Iberr() == ELCK) printf ("ELCK \n");
    If (Iberr() == MART) printf ("MART \n");
    If (Iberr() == EHDL) printf ("EHDL \n");
    If (Iberr() == EWIP) printf ("EWIP \n");
    If (Iberr() == ERST) printf ("ERST \n");
    If (Iberr() == EPWR) printf ("EPWR \n");

    printf ("Ibcnt () = %u\n", Ibcnt() ");
    printf ("\n");

    / * Call the ibonl to get the device and interface offline * /.
    ibonl (device, 0);

    "exit" (1);
    }

    The program I had is a sample I found the Instrument National software called GPIB Explorer.


  • Error "batteryInfo" has not declared in this scope

    Hi, I have this error in my project, I understand the example of the battery of the sample, but I get the error of generation.

    'MarcossitMobile10::MarcossitMobile10(bb::cascades::Application*)':
    ../src/MarcossitMobile10.cpp:17:42: error: 'batteryInfo' was not declared in this scope
    cc: C:/bbndk/host_10_0_9_404/win32/x86/usr/lib/gcc/arm-unknown-nto-qnx8.0.0eabi/4.6.3/cc1plus caught signal 1
    make[2]: *** [o.le-v7-g/.obj/MarcossitMobile10.o] Error 1
    make[2]: Leaving directory `C:/Users/marcossit/ndk-10.0.9-workspace/MarcossitMobile10/arm'
    make[1]: *** [debug] Error 2
    make[1]: Leaving directory `C:/Users/marcossit/ndk-10.0.9-workspace/MarcossitMobile10/arm'
    make: *** [Device-Debug] Error 2
    
    **** Build Finished ****
    

    I don't understand this part I declare scope

    This is the main.cpp Batterysample

    /* Copyright (c) 2012 Research In Motion Limited.
    *
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
    * You may obtain a copy of the License at
    *
    * http://www.apache.org/licenses/LICENSE-2.0
    *
    * Unless required by applicable law or agreed to in writing, software
    * distributed under the License is distributed on an "AS IS" BASIS,
    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    * See the License for the specific language governing permissions and
    * limitations under the License.
    */
    
    #include 
    #include 
    #include 
    #include 
    
    #include 
    #include 
    
    using namespace bb::cascades;
    using namespace bb::device;
    
    /**
     * This sample application shows some basic
     * usage of the BatteryInfo API, such as charging level and charging state.
     */
    Q_DECL_EXPORT int main(int argc, char **argv)
    {
        qmlRegisterUncreatableType("bb.device", 1, 0, "BatteryChargingState", "");
    
        Application app(argc, argv);
    
        QTranslator translator;
        const QString locale_string = QLocale().name();
        const QString filename = QString("batterysample_%1").arg(locale_string);
        if (translator.load(filename, "app/native/qm")) {
            app.installTranslator(&translator);
        }
    
    //! [0]
        // Create the battery info object
        BatteryInfo batteryInfo;
    
        // Load the UI description from main.qml
        QmlDocument *qml = QmlDocument::create("asset:///main.qml");
    
        // Make the BatteryInfo object available to the UI as context property
        qml->setContextProperty("_battery", &batteryInfo);
    //! [0]
    
        // Create the application scene
        AbstractPane *appPage = qml->createRootObject();
        Application::instance()->setScene(appPage);
    
        return Application::exec();
    }
    

    It's my main.cpp

    /*
    * Copyright (c) 2012 Jason I. Carter
    *
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
    * You may obtain a copy of the License at
    *
    * http://www.apache.org/licenses/LICENSE-2.0
    *
    * Unless required by applicable law or agreed to in writing, software
    * distributed under the License is distributed on an "AS IS" BASIS,
    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    * See the License for the specific language governing permissions and
    * limitations under the License.
    */
    #include "Flashlight.hpp"
    #include 
    #include 
    #include 
    #include 
    
    #include 
    #include 
    #include 
    #include "MobileMarcossit.hpp"
    #include "RegistrationHandler.hpp"
    #include "InviteToDownload.hpp"
    #include 
    
    using namespace bb::cascades;
    using namespace bb::cascades::advertisement;
    
    Q_DECL_EXPORT int main(int argc, char **argv)
    {
        // this is where the server is started etc
        Application app(argc, argv);
    
        // localization support
        QTranslator translator;
        QString locale_string = QLocale().name();
        QString filename = QString( "MobileMarcossit_%1" ).arg( locale_string );
        if (translator.load(filename, "app/native/qm")) {
            app.installTranslator( &translator );
        }
        BatteryInfo batteryInfo;
        const char *uri = "bb.cascades.advertisement";
           qmlRegisterType(uri, 1, 0, "Banner");
           qmlRegisterUncreatableType("bb.device", 1, 0, "BatteryChargingState", "");
           qmlRegisterType("Flashlight", 1, 0, "Flashlight");
    
        // Every application is required to have its own unique UUID. You should
        // keep using the same UUID when you release a new version of your application.
        //TODO:  YOU MUST CHANGE THIS UUID!
        // You can generate one here: http://www.guidgenerator.com/
        const QUuid uuid(QLatin1String("c4e27f7c-f9d2-40dc-8630-1d037a0a1309"));
    
        //Setup BBM registration handler
        RegistrationHandler *registrationHandler = new RegistrationHandler(uuid, &app);
    
        //AppName.cpp file which contains your main.qml file
        MobileMarcossit *mobileMarcossit = new MobileMarcossit(registrationHandler->context(), &app);
    
        // Whenever the registration has finished successfully, we continue to the main UI
        // Added finishRegistration() to registrationFinished()
        // This is to emit signal and by pass use of continue button as shown in sample
        QObject::connect(registrationHandler, SIGNAL(registered()), mobileMarcossit, SLOT(show()));
    
        // we complete the transaction started in the app constructor and start the client event loop here
        return Application::exec();
        // when loop is exited the Application deletes the scene which deletes all its children (per qt rules for children)
    }
    

    It's my MarcossitMobile10.cpp

    // Default empty project template
    #include "MarcossitMobile10.hpp"
    
    #include 
    #include 
    #include 
    #include 
    using namespace bb::cascades;
    
    MarcossitMobile10::MarcossitMobile10(bb::cascades::Application *app)
    : QObject(app)
    {
    
             // create scene document from main.qml asset
        // set parent to created document to ensure it exists for the whole application lifetime
        QmlDocument *qml = QmlDocument::create("asset:///main.qml").parent(this);
        qml->setContextProperty("_battery", &batteryInfo);
        // create root object for the UI
        AbstractPane *root = qml->createRootObject();
    
        // set created root object as a scene
        app->setScene(root);
    }
    

    and get the error in this line that I declare.

     qml->setContextProperty("_battery", &batteryInfo);
    

    Help...

    Organizing in this way PPH, but already now, run nothing comes in my dev alpha application

    MarcossitMobile10.hpp

    // Default empty project template
    #ifndef MarcossitMobile10_HPP_
    #define MarcossitMobile10_HPP_
    
    #include 
    
    #include 
    namespace bb { namespace cascades { class Application; }}
    
    /*!
     * @brief Application pane object
     *
     *Use this object to create and init app UI, to create context objects, to register the new meta types etc.
     */
    class MarcossitMobile10 : public QObject
    {
        Q_OBJECT
    public:
        bb::device::BatteryInfo* batteryInfo;
        MarcossitMobile10(bb::cascades::Application *app);
        virtual ~MarcossitMobile10() {}
    };
    
    #endif /* MarcossitMobile10_HPP_ */
    

    the qml constructor is bateria.qml

    /* Copyright (c) 2012 Research In Motion Limited.
    *
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
    * You may obtain a copy of the License at
    *
    * http://www.apache.org/licenses/LICENSE-2.0
    *
    * Unless required by applicable law or agreed to in writing, software
    * distributed under the License is distributed on an "AS IS" BASIS,
    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    * See the License for the specific language governing permissions and
    * limitations under the License.
    */
    
    import bb.cascades 1.0
    import bb.device 1.0
    
    // Page laying out the visual components
    Page {
        Container {
            layout: DockLayout {}
    
            ImageView {
                horizontalAlignment: HorizontalAlignment.Fill
                verticalAlignment: VerticalAlignment.Fill
    
                imageSource: "asset:///images/bateria/background.png"
            }
    
            Battery {
                horizontalAlignment: HorizontalAlignment.Center
                verticalAlignment: VerticalAlignment.Center
            }
    
            Container {
                horizontalAlignment: HorizontalAlignment.Center
                verticalAlignment: VerticalAlignment.Bottom
    
                bottomPadding: 50
    
                //! [0]
                Label {
                    id: stateLabel
    
                    horizontalAlignment: HorizontalAlignment.Center
    
                    text: {
                        switch (_battery.chargingState) {
                            case BatteryChargingState.Unknown:
                                return qsTr ("Unknown");
                                break;
                            case BatteryChargingState.NotCharging:
                                return qsTr ("Not Charging");
                                break;
                            case BatteryChargingState.Charging:
                                return qsTr ("Charging");
                                break;
                            case BatteryChargingState.Discharging:
                                return qsTr ("Discharging");
                                break;
                            case BatteryChargingState.Full:
                                return qsTr ("Full");
                                break;
                        }
                    }
                    textStyle {
                        color: Color.White
                        fontSize: FontSize.XLarge
                    }
                }
                //! [0]
    
                Label {
                    id: descriptionLabel
    
                    horizontalAlignment: HorizontalAlignment.Center
                    bottomMargin: 100
    
                    text: {
                        switch (_battery.chargingState) {
                            case BatteryChargingState.Unknown:
                                return qsTr ("Something is up with the battery");
                                break;
                            case BatteryChargingState.NotCharging:
                                return qsTr ("Plugged in, just no charge");
                                break;
                            case BatteryChargingState.Charging:
                                return qsTr ("Plugged in");
                                break;
                            case BatteryChargingState.Discharging:
                                return qsTr ("Unplugged and discharging");
                                break;
                            case BatteryChargingState.Full:
                                return qsTr ("Plugged in, full");
                                break;
                        }
                    }
                    textStyle {
                        color: Color.Gray
                        fontSize: FontSize.Large
                    }
                }
            }
        }
    }
    

    and the qml plugin is Battery.qml

    /* Copyright (c) 2012 Research In Motion Limited.
    *
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
    * You may obtain a copy of the License at
    *
    * http://www.apache.org/licenses/LICENSE-2.0
    *
    * Unless required by applicable law or agreed to in writing, software
    * distributed under the License is distributed on an "AS IS" BASIS,
    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    * See the License for the specific language governing permissions and
    * limitations under the License.
    */
    
    import bb.cascades 1.0
    import bb.device 1.0
    
    Container {
        preferredWidth: 498
        preferredHeight: 318
    
        layout: DockLayout {}
    
        //! [0]
        ImageView {
            id: batteryOutline
    
            horizontalAlignment: HorizontalAlignment.Center
            verticalAlignment: VerticalAlignment.Center
    
            imageSource: _battery.chargingState == BatteryChargingState.Unknown ? "asset:///images/bateria/battery_plugged_error.png" :
                         _battery.chargingState == BatteryChargingState.NotCharging ? "asset:///images/bateria/battery_plugged_bad.png" :
                         _battery.chargingState == BatteryChargingState.Charging ? "asset:///images/bateria/battery_plugged.png" :
                         _battery.chargingState == BatteryChargingState.Discharging ? "asset:///images/bateria/battery.png" :
                         _battery.chargingState == BatteryChargingState.Full ? "asset:///images/bateria/battery_plugged.png" : ""
        }
        //! [0]
    
        //! [1]
        ImageView {
            id: loadingLevel
    
            horizontalAlignment: HorizontalAlignment.Left
            verticalAlignment: VerticalAlignment.Center
    
            translationX: 75
            preferredWidth: _battery.level * 350.0 / 100.0
    
            imageSource: _battery.level <= 10 ? "asset:///images/bateria/fill_red.png" :
                         _battery.level <= 20 ? "asset:///images/bateria/fill_yellow.png" :
                         _battery.level < 100 ? "asset:///images/bateria/fill_grey.png" : "asset:///images/bateria/fill_green.png"
        }
        //! [1]
    
        ImageView {
            id: stateIndicator
    
            horizontalAlignment: HorizontalAlignment.Center
            verticalAlignment: VerticalAlignment.Center
    
            imageSource: _battery.chargingState == BatteryChargingState.Unknown ? "asset:///images/bateria/exclamation.png" :
                         _battery.chargingState == BatteryChargingState.NotCharging ? "asset:///images/bateria/exlamation.png" :
                         _battery.chargingState == BatteryChargingState.Charging ? "asset:///images/bateria/flash.png" :
                         _battery.chargingState == BatteryChargingState.Discharging ? "" :
                         _battery.chargingState == BatteryChargingState.Full ? "" : ""
        }
    }
    

    It will be something else?

    qml->setContextProperty("_battery", &batteryInfo);
    

    for example

    qml->setContextProperty("_bateria", &batteryInfo);
    
    or
    
    qml->setContextProperty("Battery", &batteryInfo);
    
  • error: 'QmlDocument' was not declared in this scope

    I followed along the following:

    https://developer.BlackBerry.com/Cascades/documentation/UI/integrating_cpp_qml/index.html

    And added the following code to main.cpp:

    #include 
    #include 
    
    #include "app.hpp"
    
    using ::bb::cascades::Application;
    
    int main(int argc, char **argv)
    {
        Application app(argc, argv);
    
        QmlDocument *qml = QmlDocument::create("main.qml");
        AbstractPane *root = qml->createRootNode();
        Application::setScene(root);
    
        return Application::exec();
    }
    

    When compiling, I get the error:

    error: 'QmlDocument' was not declared in this scope
    

    Your weird namespace.

    using bb::cascades;

    Try this.

    Edit: Also if I were you I wouldn't want to create a new project and select HelloCasades as a model.  That will be running a lot faster than to try to do it from scratch.

  • Toast not declared in the scope

    Hello

    I am going through the updated documentation and having problems of implementation of the toast.

    void App::showToast() {
        toast = new SystemToast(this);
        toast->setBody("Welcome to the BlackBerry 10 Cascades documentation!" + "You have lots of space, but your text will wrap around in the dialog box.");
        toast->show();
    }
    

    Returns an error: "toast not declared in the scope" on this line:

    toast = new SystemToast(this);
    

    I've added all these header files to my name .cpp

    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    
    using namespace bb::cascades;
    using namespace bb::system;
    

    My .pro includes these:

    LIBS   += -lbbdata -lbbsystem
    

    My header app.hpp file looks like this

    // List with context menu project template
    #ifndef App_HPP_
    #define App_HPP_
    
    #include 
    
    namespace bb { namespace cascades { class Application; }}
    
    /*!
     * @brief Application pane object
     *
     *Use this object to create and init app UI, to create context objects, to register the new meta types etc.
     */
    class App : public QObject
    {
        Q_OBJECT
    public:
        App(bb::cascades::Application *app);
        virtual ~App() {}
        void showToast();
    };
    
    #endif /* App_HPP_ */
    

    Have a blast to find out why its not working. Anyone of you has a working example that connects everything to display a simple toast?

    Thank you

    I guess you missed the variable declaration.

    Declare an SystemToast object in the method itself or in app.hpp like this:

    SystemToast *toast;
    

    Kind regards

    Nishant Shah

  • SqlDataAccess has not declared in this scope

    Learn how to use SQL statements in the Cascades.

    I'm following the example provided in https://developer.blackberry.com/cascades/reference/bb__data__sqldataaccess.html

    I copied the code example in my app.cpp and consisted of two instructions include:

    #include 
    #include 
    

    Here is the code

    // create a data model with sorting keys for firstname and lastname
    GroupDataModel *model =
      new GroupDataModel(QStringList() << "firstname" << "lastname");
    
    // load the sql data from contacts table
    SqlDataAccess sda("contacts.db");
    QVariant list = sda.execute("select * from contact order by firstname");
    
    // add the data to the model
    model->insertList(list.value());
    
    // create a ListView control and add the model to the list
    ListView *listView = new ListView();
    listView->setDataModel(model);
    

    When I compile I get the following:

    ../src/app.cpp:21:5: error: 'SqlDataAccess' was not declared in this scope
    

    What I am doing wrong?

    Thank you!

    SqlDataAccess is located in the bb::data namespace.

    Also, need to add the line:

    LIBS += -lbbdata
    

    in *.pro in your project file. See here:

    https://developer.BlackBerry.com/Cascades/documentation/dev/upgrading/index.html#library

  • Namespace prefix in the element root missing in variable assignment

    Hello

    We have the same problem not yet responded to this post, :

    Namespace prefix in the element root missing in variable assignment

    The proposed solution uses Java Embebeding, really think it's very dangerous.

    Is there another way?

    Thank you.

    We can use a literal xml (icon is like a "piece of the puzzle").

    For example:

    for this expected xml:

    
       0
       1
       2
       3
    
    

    in bpel entitled, we can use:

                    
                      
       0
       1
       2
       3
    
                      
                    
                    
                      
                      
                    
    ----
    
  • Compiler error message: BC30451: name 'UserEmail' is not declared.

    Get the message when I test the page. Anyone sugest a solution please?
    Compiler error message: BC30451: name 'UserEmail' is not declared.

    Code in the page below.


    < % @ Page Language = "VB" ContentType = "text/html" ResponseEncoding = "iso-8859-1" % >
    < % @ register TagPrefix = "MM" Namespace = Assembly "DreamweaverCtrls" = "DreamweaverCtrls, version = 1.0.0.0, publicKeyToken = 836f606ede05d46a, culture = neutra l" % > "
    < MM:DataSet
    ID = "dsUsers".
    Runat = "Server".
    IsStoredProcedure = "false".
    ConnectionString = "< % # System.Configuration.ConfigurationSettings.AppSettings ('lle MM_CONNECTION_STRING_conSQLPerene") % > '.
    Type_base_donnees = ' < % # System.Configuration.ConfigurationSettings.AppSettings ("Perenelle MM_CONNECTION_DATABASETYPE_conSQL") % > '.
    CommandText = "< % #"SELECT dbo. " Users.UserEmail, dbo. Users.UserPassword FROM dbo. Users WHERE dbo. Users.UserEmail=@UserEmail AND dbo. Users.UserPassword=@UserPassword"% > '
    Expression = '< % # IsPostBack % > '.
    Debug = 'true '.
    > < Parameters >
    "< Name="@UserEmail parameter "Value =" < % # IIf ((Request.Form ("UserEmail") <>Nothing), Request.Form ("UserEmail"), "") % > ' Type = "NVarChar" / > "
    "< Name="@UserPassword parameter "Value =" < % # IIf ((Request.Form ("UserPassword") <>Nothing), Request.Form ("UserPassword"), "") % > ' Type = "NVarChar" / > "
    < / Parameter > < / MM:DataSet >
    < MM:PageBind runat = "server" PostBackBind = "true" / >

    < script language = "VB" runat = "server" >
    Protected Sub Page_Load (ByVal Src As Object, ByVal E As EventArgs)
    "Don't cache this page.
    Response.Expires = - 1
    Response.AddHeader ("Pragma", "no-cache")
    Response.AddHeader ("cache-control", "no-store")

    "Check the user credentials in the page".
    If (UserEmail.Value = dsUsers.FieldValue ("UserEmail", Nothing)) & & (UserPassword.Value = dsUsers.FieldValue ("UserPassword", Nothing)) Then
    ' The user has been authenticated.
    "1. create the authentication ticket."
    "2 redirect to the appropriate page.

    "1. create the authentication ticket."
    "Create and use forms authentication ticket.
    FormsAuthenticationTicket ticket = New FormsAuthenticationTicket(1,)
    Request.Form ("UserEmail"),
    DateTime.Now, ' issue times
    DateTime.Now.AddMinutes (30), ' expires in 30 minutes
    False, ' no persisting
    Dim ' role assignment is stored in the UserData as 'Users')

    "Create a new HttpCookie (encrypted) using the ticket has created."
    ' and name it accordingly to the value specified in the < forms > element
    ' in the web.config file.
    Dim Cookie As HttpCookie = New HttpCookie (FormsAuthentication.FormsCookieName, FormsAuthentication.Encrypt (ticket))

    ' Add the cookie to the outgoing response.
    Response.Cookies.Add (cookie)

    'Redirect as appropriate.
    Dim ReturnUrl As String
    If Request.QueryString ("ReturnURL") Is Nothing Then
    ReturnUrl = "/client-area/index.aspx."
    On the other
    ReturnUrl = Request.QueryString ("ReturnURL")
    End If
    Response.Redirect (ReturnUrl)

    On the other
    Msg.Text = "Invalid Credentials: Please try again."
    End If
    End Sub
    < /script >


    Replied. Just named incorrectly input fields. Couple of other problems too but sorted and now works fine...

  • Error: Reference to undeclared namespace prefix: 'xsi '.

    Hello
    I created XML generation code but when I check the result set according to error out:
    Error: Reference to undeclared namespace prefix: 'xsi '.
    Plesae suggest a way out of the code.
    I use Internet Explore version - 7.0.5730.11 and Oracle version 10.2.0.2.0

    -Step 1
    CREATE TABLE EMP (EMPCODE NUMBER (8), EMPNAME VARCHAR2 (100), THE NUMBER OF EMPDEPTNO (8), NUMBER EMPSAL (34.2));
    -Step 2
    INSERT INTO VALUES EMP (100, "LAL JHETA", 20, 1500);
    INSERT INTO VALUES EMP (100, 'LOPEZ', 20, 6000);
    INSERT INTO VALUES EMP (100, 'PARVEZ KHAN', 20, 7000);
    INSERT INTO VALUES EMP (100, "AKBAR KHAN", 20, 8000);
    INSERT INTO VALUES EMP (100, 'RAHUL KHAN', 20, 9000);
    INSERT INTO VALUES EMP (100, "TUSHAR SIMONA", 10, 1000);
    INSERT INTO VALUES EMP (100, "MANOJ PERRON", 10, 2000);
    INSERT INTO VALUES EMP (100, 'HEMANT DAS', 10, 4000);
    INSERT INTO VALUES EMP (100, "YOGESH NAGLE", 10, 5000);
    -Step 3
    create table EMPXML (XMLCLOB CLOB)
    -Step 4
    DECLARE
    CLOB v_xmldata;
    v_tmpdata CLOB.
    BEGIN
    DBMS_LOB.CREATETEMPORARY (v_tmpdata, false);
    v_xmldata: = ' <? XML version = "1.0" encoding = "UTF-8"? > ';


    SELECT to_clob (RESULT) IN (DE) v_tmpdata
    SELECT Xmlelement ("employee",

    XmlAttributes ('"http://ns.oracle.com.tw/XSD/CTCB/ESB/Message/EMF/ServiceEnvelope" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" ' AS)
    "xmlns:ns0,"
    "'http://ns.oracle.com.tw/XSD/CTCB/ESB/Message/EMF/ServiceEnvelope ServiceEnvelope.xsd' > ' AS"
    ("xsi: schemaLocation").
    XMLAGG (Xmlforest (AS Empcode "EmpID",
    EmpName AS "EmpName",.
    Empsal AS 'EmpSal'))) RESULT
    FROM Emp
    WHERE Empdeptno = 20);



    DBMS_LOB. Append (v_xmldata, v_tmpdata);
    INSERT IN EMPXML VALUES (v_xmldata);
    END;

    -Step 5
    SELECT * from empxml;

    -Step 6
    DROP TABLE EMP PURGE;
    -Step 7
    DROP TABLE EMPXML PURGE;

    Thank you and best regards,
    Yogesh Nagle
    India

    Published by: user11738447 on August 6, 2009 11:19

    Try

    declare
         v_xmldata clob;
         v_tmpdata clob;
    begin
         dbms_lob.createtemporary (v_tmpdata, false);
         v_xmldata := '';
    
         select to_clob (result)
           into v_tmpdata
           from (select xmlelement ("Employee",
                                  xmlattributes ('http://ns.oracle.com.tw/XSD/CTCB/ESB/Message/EMF/ServiceEnvelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance' as "xmlns:ns0",
                                  'http://ns.oracle.com.tw/XSD/CTCB/ESB/Message/EMF/ServiceEnvelope ServiceEnvelope.xsd>' as "xsi:schemaLocation"),
                                  xmlagg (xmlforest (empcode as "EmpID", empname as "EmpName",
                                              empsal as "EmpSal")))
                                       result
                         from emp2
                        where empdeptno = 20);
    
         dbms_lob.append (v_xmldata, v_tmpdata);
    
         insert into empxml
               values (
                                  utl_i18n.unescape_reference(v_xmldata)
                          );
    end;
    /
    

Maybe you are looking for