Multi attribute in xml - in the element schema root

Hello

I have several attribute in the xml file. all of them - in the root element.

I know I have to put the declaration of the attribute in the lower part of the Diagram.

When I put that one attribute in the schema - everything is OK.

but I have more than one attribute (I have 8 attributes...), and I get this error:

ORA-01460: LETTER, DEAD OR UNREASONABLE CONVERSION


XML file:

< MyRootElement Myattribute1 = 'MyValue1 '.

MyAttribute2 = "MyValue2".

MyAttribute3 = "MyValue3".

"xmlns ="http://www.oracle.com/xml/test.xsd"

xmlns ="http://www.w3.org/2001/xmlSchema-instance at the beginning of this line there should be written:" xmlns: xsi", but it's gone...".

xsi: schemaLocation =http://www.oracle.com/xml/test.xsd my_schema_file.xsd' > '.

XSD file:

"" < schema targetNameSpace = "http://www.oracle.com/xml/test.xsd"

"xmlns ="http://www.w3.org/2001/xmlSchema"

xmlns: xdb = "http://xmlns.oracle.com/xdb."

version = "1.0".

elementFormDefault = "qualified" >

< element name = "MyRootElement" >

< complexType >

< sequence >

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

-the rest of the xsd file.

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

< / sequence >

< attribute name = "MyAttribute1" type = "string" use = "required".

< attribute name = "MyAttribute2" type = "string" use = "required".

< / complexType >

< / item >

< / schema >

Someone knows what's the problem?

Thanks in advance,

Elad

Thank you.

Okay... where to start? Almost everything is bad or at least very awkward

(1) do not use the physical path with UTL_FILE, that has been obsolete for many years now. Use directory objects.

And in fact, you don't even have UTL_FILE here.

(2) the XML schema must be saved at once, in a separate script.

Or do you expect to change them as often you must include the part of the record of the proceedings?

(3) If your input XML document has an attribute xsi: schemaLocation, make sure that you save the schema using the same URL.

In your example, there is a mismatch: 'my_schema_file.xsd' vs 'xml_schema.xsd' in the register command.

So, to summarize:

Create a directory:

create or replace directory xml_dir as ' / home/myPath ";

Save the schema (once):

() dbms_xmlschema.registerschema

schemaurl-online "my_schema_file.xsd."

schemadoc-online xmltype)

BFILENAME ('XML_DIR', '')

, nls_charset_id ('AL32UTF8') - use the actual encoding of the file here

)

local-online true

genTypes-online fake

gentables-online fake

enableHierarchy-online dbms_xmlschema.enable_hierarchy_none

);

So here's how I would rewrite the function:

create or replace function schema_xml_333 (p_tested_xml in varchar2)

return varchar2

is

doc xmltype: = xmltype (bfilename ('XML_DIR', p_tested_xml), nls_charset_id ('AL32UTF8'));

Start

return case when doc.isSchemaValid () = 1

then "XML is valid.

otherwise "XML is not valid.

end;

end;

/

Yet once, this will not work if the XML contains an attribute xsi: schemaLocation whose part URL pattern matches the URL used for recording.

In this case, you don't need the createSchemaBasedXML method.

Tags: Database

Similar Questions

  • Table of attributes in the XML element and the element values. Is this possible?

    I use BI Publisher generator model for Word. I'm using Word 2007 and the patch 9821068 generator model.

    I'm trying to create a table using the table Wizard. The values in the column must be based on the attributes of the element and the element values. I have no control over the incoming data.

    Given the following XML:

    <? XML version = "1.0" encoding = "UTF-8"? >
    < valuesOverTime type = "fromServer" >
    < name aValue = "xyz" date = "2010-07-21" time = "" 15: 55:26 ' > 2 < / aValue > "
    < name aValue = 'abc' date = "2010-07-21" time = "" 15: 55:26 ' > 0 < / aValue > "
    < name aValue = "xyz" date = "2010-07-21" time = "" 15: 55:26 "> 42 < / aValue >"
    < name aValue = 'abc' date = "2010-07-21" time = "" 15: 55:26 "> 100 < / aValue >"
    < name aValue = "xyz" date = "2010-07-21" time = "" 15: 55:26 "> 17 < / aValue >"
    < name aValue = 'abc' date = "2010-07-21" time = "" 15: 55:26 ' > 0 < / aValue > "
    < name aValue = "xyz" date = "2010-07-21" time = "" 15: 55:26 "> 1 < / aValue >"
    < / valuesOverTime >

    Table I need should look like this:

    name date time aValue
    XYZ-2010-07-21 15:55:26 2
    ABC-2010-07-21 15:55:26 0
    XYZ-2010-07-21 15:55:26 42

    So far, that I can understand it.

    Any suggestions?

    Thank you
    -Matt
    
      
    
    
  • WSSE-Server CodecHandler toUnable Failed to find the xml for setting element

    Hi all
    I invoke a Java webservice with signature and encryption (WSSE) of the soap message in my client program.
    The webservice is built with a JWSC ant task and deployed in weblogic 10.3.2 I get the below exception when calling it.
    I invoke a web service that takes a string as input and returns a string output. This web service uses the signature and encryption on both directions.
    I checked the public/private key certificates and everything seems to be ok.
    I don't know how to fix the sub question. Let me know if you have encountered this problem and it is solved.


    -[HTTP - https://cdctdevapp:7042/casestatusservice/CaseStatusService - 500 response]-
    Date: Monday, October 15, 2012 03:24:12 GMT
    X-powered-by: Servlet/JSP/2.1 2.5
    Content-type: text/xml; charset = utf-8
    Encoding: segmented
    NULL: HTTP/1.1 500 Internal Server Error
    < env:Envelope = "http://schemas.xmlsoap.org/soap/envelope/" xmlns:env > < env:Header / > < env:Server env:Body > < env:Fault > < faultcode > < / faultcode > < faultstring > [CodecHandler Server] could not decode
    -& gt; Could not find the xml for setting element: message
    < / faultstring > < details > < bea_fault:stacktrace xmlns:bea_fault = "http://www.bea.com/servers/wls70/webservice/fault/1.0.0" > weblogic.wsee.codec.CodecException: could not find the xml for setting element: message
    at weblogic.wsee.codec.soap11.SoapDecoder.checkNullElement(SoapDecoder.java:397)
    at weblogic.wsee.codec.soap11.SoapDecoder.decodeParams(SoapDecoder.java:285)
    at weblogic.wsee.codec.soap11.SoapDecoder.decodeParts(SoapDecoder.java:172)
    at weblogic.wsee.codec.soap11.SoapDecoder.decode(SoapDecoder.java:125)
    at weblogic.wsee.codec.soap11.SoapCodec.decode(SoapCodec.java:182)
    at weblogic.wsee.ws.dispatch.server.CodecHandler.decode(CodecHandler.java:139)
    at weblogic.wsee.ws.dispatch.server.CodecHandler.handleRequest(CodecHandler.java:40)
    at weblogic.wsee.handler.HandlerIterator.handleRequest(HandlerIterator.java:141)
    at weblogic.wsee.ws.dispatch.server.ServerDispatcher.dispatch(ServerDispatcher.java:114)
    at weblogic.wsee.ws.WsSkel.invoke(WsSkel.java:80)
    at weblogic.wsee.server.servlet.SoapProcessor.handlePost(SoapProcessor.java:66)
    at weblogic.wsee.server.servlet.SoapProcessor.process(SoapProcessor.java:44)
    to weblogic.wsee.server.servlet.BaseWSServlet$ AuthorizedInvoke.run (BaseWSServlet.java:285)
    at weblogic.wsee.server.servlet.BaseWSServlet.service(BaseWSServlet.java:169)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    to weblogic.servlet.internal.StubSecurityHelper$ ServletServiceAction.run (StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:183)
    to weblogic.servlet.internal.WebAppServletContext$ ServletInvocationAction.wrapRun (WebAppServletContext.java:3717)
    to weblogic.servlet.internal.WebAppServletContext$ ServletInvocationAction.run (WebAppServletContext.java:3681)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
    < / bea_fault:stacktrace > < / details > < / env:Fault > < / env:Body > < / env:Envelope >.

    < WSEE:1 > create < SoapMessageContext. < init >: 48 >
    < WSEE:1 > set Message called: com.sun.xml.messaging.saaj.soap.ver1_1.Message1_1Impl@996b65 < SoapMessageContext.setMessage:65 >
    < WSEE:1 > set Message called: com.sun.xml.messaging.saaj.soap.ver1_1.Message1_1Impl@996b65 < SoapMessageContext.setMessage:65 >
    < WSEE:1 > set Message called: com.sun.xml.messaging.saaj.soap.ver1_1.Message1_1Impl@996b65 < SoapMessageContext.setMessage:65 >
    < WSEE:1 > set Message called: com.sun.xml.messaging.saaj.soap.ver1_1.Message1_1Impl@996b65 < SoapMessageContext.setMessage:65 >
    Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: [CodecHandler Server] could not decode
    -> Could not find the xml for setting element: message

    at com.sun.xml.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:197)
    at com.sun.xml.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:130)
    at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:125)
    at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:95)
    at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:136)
    to $Proxy27.sayHello (Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (unknown Source)
    at java.lang.reflect.Method.invoke (unknown Source)
    at weblogic.wsee.jaxws.spi.ClientInstanceInvocationHandler.invoke(ClientInstanceInvocationHandler.java:84)
    to $Proxy28.sayHello (Unknown Source)
    at org.adr.nydcci.wss.ws5UntSignEncryptHttps.client.ws5UntSignEncryptHttpsPortClient.main(ws5UntSignEncryptHttpsPortClient.java:44)

    Thank you very much, Sunil. I could solve the problem.
    Demand has been framed properly, as my annotation TJS for my client was pointing to a fake name.
    fixed the ' @WebParam (name = "") ")" attribute to my client and it worked well. " The problem is solved now.

    Thank you
    Sriram

  • How to omit elements/attributes if the value of the element is zero?

    Hi gurus

    It's me again. with a quick question...
    I'm sure everyone knows the difference between these two statements (running in the SCOTT schema):

    Select
    XmlElement ('employees',
    XMLAGG)
    XMLFOREST (comm as "SalesCommEmployee")
    )
    )
    EMP;

    Select
    XmlElement ('employees',
    XMLAGG)
    XmlElement ("SalesCommEmployee", comm)
    )
    )
    EMP;

    First statement out fewer records because XMLFOREST shows nothing if the value of the element is null.
    But what happens if element has attributes?. Say:

    Select
    XmlElement ('employees',
    XMLAGG)
    XmlElement ("SalesCommEmployee", xmlattributes (empno as "id"), comm)
    )
    )
    EMP;

    Is it possible to omit any element (including attributes) if the value of the element is set to zero.
    Of course, it is a simplistic example, in this case, a WHERE clause would solve the problem.
    In my particular case, I am managing a huge SELECT with multiple levels of xml and some elements (with attributes), may have null values, and must be included in this case nothing.

    I am considering a dirty search/delete option on the output, but I think that a more elegant solution must exist.

    Can you give me some advice?

    Thank you
    Oscar

    Hello

    You can use a CASE statement, DECODE or NVL2 functions.

    Here is an example with NVL2 (returns 2nd argument if the 1st is not not null, otherwise the 3rd):

    SQL> select xmlserialize(document
      2           xmlelement("Employees",
      3             xmlagg(
      4               nvl2( comm
      5                   , xmlelement("SalesCommEmployee", xmlattributes(empno as "id"), comm)
      6                   , null )
      7             )
      8           )
      9           as clob indent
     10         ) as result
     11  from scott.emp
     12  ;
    
    RESULT
    --------------------------------------------------------------------------------
    
      300
      500
      1400
      0
    
     
    
  • XML validation against the XSD schema

    Hi all

    I have a strange problem.

    I'm trying to validate an XMLTYPE variable against a XSD schema using the XMLisValid function.

    The XML code that I am trying to validate returned false (0) when you use this method.

    However, when I save the XSD against a column in a table, and then insert this XMLTYPE in this column, I don't get any errors. If I change the XSD to ensure failure when using this method, I get an error, if it is registered and work.

    I then created a very basic XSD and both methods work when validating XML against that. Then of course the XSD harder I want to validate against a difference, but I expect or them both don't both pass, not a failure and a single pass.

    Does anyone know why it would return different results?

    Thanks in advance for your help.

    Robin

    examples of what I use:

    XML to validate:

    <>centers
    < Add >
    <>Center
    < centreName > name 1 < / centreName >
    < centreRef > 45678 < / centreRef >
    < / Center >
    < / add >
    < / Center >

    Simple XSD:

    <? XML version = "1.0" encoding = "UTF-8"? >
    < xs: Schema attributeFormDefault = "unqualified" elementFormDefault = "qualified" xmlns: XS = "http://www.w3.org/2001/XMLSchema" >
    < xs: element name = "centres" type = "centresType" / >
    < name XS: complexType 'addType' = >
    < xs: SEQUENCE >
    < xs: ELEMENT type = "xs: String" name = "centreName" / >
    < xs: ELEMENT type = "xs:short" name = "centreRef" / >
    < / xs: SEQUENCE >
    < / xs: complexType >
    < name XS: complexType = "centresType" >
    < xs: SEQUENCE >
    < xs: ELEMENT type = "addType" name = 'Add' maxOccurs = "3" minOccurs = "0" / >
    < / xs: SEQUENCE >
    < / xs: complexType >
    < / xs: Schema >

    XSD complex:

    <? XML version = "1.0" encoding = "utf-8"? >
    <! - created with liquid XML Studio - 30 Day Trial Edition 7.1.6.1440 (http://www.liquid-technologies.com)->
    < xs: Schema attributeFormDefault = "unqualified" elementFormDefault = "qualified" xmlns: XS = "http://www.w3.org/2001/XMLSchema" >
    < xs: element name = "Center" >
    < xs: complexType >
    < xs: SEQUENCE >
    < xs: element name = "Remove" >
    < xs: complexType >
    < xs: SEQUENCE >
    < xs: ELEMENT minOccurs = "0" maxOccurs = "1000" name = "centreRef" >
    < xs:simpleType >
    < xs:restriction base = "XS: String" >
    < xs:minLength value = "1" / >
    < xs:maxLength value = "50" / >
    < / xs:restriction >
    < / xs:simpleType >
    < / xs: element >
    < / xs: SEQUENCE >
    < / xs: complexType >
    < / xs: element >
    < xs: element name = "Add" >
    < xs: complexType >
    < xs: SEQUENCE >
    < xs: ELEMENT minOccurs = "0" maxOccurs = "1000" name = "Center" >
    < xs: complexType >
    < xs: SEQUENCE >
    < xs: element name = "centreName" >
    < xs:simpleType >
    < xs:restriction base = "XS: String" >
    < xs:minLength value = "1" / >
    < xs:maxLength value = "100" / >
    < / xs:restriction >
    < / xs:simpleType >
    < / xs: element >
    < xs: element name = "centreRef" >
    < xs:simpleType >
    < xs:restriction base = "XS: String" >
    < xs:minLength value = "1" / >
    < xs:maxLength value = "50" / >
    < / xs:restriction >
    < / xs:simpleType >
    < / xs: element >
    < xs: ELEMENT minOccurs = "0" maxOccurs = "1" name = "qualities" >
    < xs: complexType >
    < xs: SEQUENCE >
    < xs: ELEMENT minOccurs = "0" maxOccurs = "1000" name = "qualRef" >
    < xs:simpleType >
    < xs:restriction base = "XS: String" >
    < xs:minLength value = "1" / >
    < xs:maxLength value = "100" / >
    < / xs:restriction >
    < / xs:simpleType >
    < / xs: element >
    < / xs: SEQUENCE >
    < / xs: complexType >
    < / xs: element >
    < / xs: SEQUENCE >
    < / xs: complexType >
    < / xs: element >
    < / xs: SEQUENCE >
    < / xs: complexType >
    < / xs: element >
    < xs: element name = "modifyQualAssociations" >
    < xs: complexType >
    < xs: SEQUENCE >
    < xs: element name = "Remove" >
    < xs: complexType >
    < xs: SEQUENCE >
    < xs: ELEMENT minOccurs = "0" maxOccurs = "1000" name = "o" >
    < xs: complexType >
    < name XS: attribute = use "centreRef" = "required" >
    < xs:simpleType >
    < xs:restriction base = "XS: String" >
    < xs:minLength value = "1" / >
    < xs:maxLength value = "50" / >
    < / xs:restriction >
    < / xs:simpleType >
    < / xs: attribute >
    < name XS: attribute = use "qualRef" = "required" >
    < xs:simpleType >
    < xs:restriction base = "XS: String" >
    < xs:minLength value = "1" / >
    < xs:maxLength value = "100" / >
    < / xs:restriction >
    < / xs:simpleType >
    < / xs: attribute >
    < / xs: complexType >
    < / xs: element >
    < / xs: SEQUENCE >
    < / xs: complexType >
    < / xs: element >
    < xs: element name = "Add" >
    < xs: complexType >
    < xs: SEQUENCE >
    < xs: ELEMENT minOccurs = "0" maxOccurs = "1000" name = 'a' >
    < xs: complexType >
    < name XS: attribute = use "centreRef" = "required" >
    < xs:simpleType >
    < xs:restriction base = "XS: String" >
    < xs:minLength value = "1" / >
    < xs:maxLength value = "50" / >
    < / xs:restriction >
    < / xs:simpleType >
    < / xs: attribute >
    < name XS: attribute = use "qualRef" = "required" >
    < xs:simpleType >
    < xs:restriction base = "XS: String" >
    < xs:minLength value = "1" / >
    < xs:maxLength value = "100" / >
    < / xs:restriction >
    < / xs:simpleType >
    < / xs: attribute >
    < / xs: complexType >
    < / xs: element >
    < / xs: SEQUENCE >
    < / xs: complexType >
    < / xs: element >
    < / xs: SEQUENCE >
    < / xs: complexType >
    < / xs: element >
    < / xs: SEQUENCE >
    < / xs: complexType >
    < / xs: element >
    < / xs: Schema >

    Just had a quick glance at your XSD complex...

    
    
    

    You have a piece of 'delete' that is required as part of the sequence of elements with the element "centers." Yet your XML will fail validation compared with what it has only one item "add".

    Maybe your

    
    

    must be:

    
    

    ?

    Just guessing. ;)

  • workaround for the limitation of pilot ODI xml: same name of the element under

    Hello

    I have an xml schema, as shown below that has a (GTIN) name of the element that is repeated as sub in other element name type complex

    < xs: element name = "ArticleDetails1" maxOccurs = "unbounded" >

    < xs: complexType >

    < xs: SEQUENCE >

    < xs: element name = "GTIN" type = "xs: String" minOccurs = "1" maxOccurs = "1" / >

    < xs: element name = "IETS1" minOccurs = "0" maxOccurs = "1" >

    < xs: complexType >

    < xs: SEQUENCE >

    < xs: element name = "GTIN" type = "xs: String" maxOccurs = "unbounded" / >

    < / xs: SEQUENCE >

    < / xs: complexType >

    < / xs: element >

    < xs: SEQUENCE >

    < / xs: complexType >

    < / xs: element >

    When I strip, I was hoping IETS1 tables and GTIN which will be a reference to the IETS1 table. But only IETS1 table is created to which several GTIN are ignored when the xml file is loaded (GTIN only the first goes to the table of the IETS1). If I change item under IETS1 say 'GTIN1' and then 2 tables is created for the IETS1 and another for GTIN1 and things work fine in this case.

    I came across this link Re: XML JMS queue: items with the same name

    who says it's a limitation of xml driver.

    I'm interested to know if there is a work around for this problem as long as it is not well known, but it is possible to change the name of the sub element in Xsd that came from another system?


    Thank you.

    Well, I discovered the work around. The trick is to give f = in url jdbc (instead of DTD path) and specify number (GTIN) nodes under the node of the IETS1.

  • Store XML in the schema issue generated tables and XML Validation against the schema.

    Hello friends,

    I am facing a problem where to store xml in a saved schema generated from tables.

    It's my diagram

    --

    <? XML version = "1.0" encoding = "UTF-8"? >

    " < xs: schema xmlns:ds = ' http://www.w3.org/2000/09/xmldsig# "" xmlns: XS = " " http://www.w3.org/2001/XMLSchema "xmlns =" " http://www.ABC.inf.in/test "targetNamespace =" " http://www.abc.inf.in/test" elementFormDefault = "qualified" attributeFormDefault = "unqualified" > "

    < xs: include schemaLocation = "abc.xsd" / >

    < xs: element name = "project" type = 'student' >

    < xs: annotation >

    < Intention > it is a Documentation < / intention >

    < / xs: annotation >

    < / xs: element >

    < / xs: Schema >

    -This is my xml document

    "< project versão ="2.00"xmlns ="http://www.abc.inf.in/test">."

    "< test xmlns ="http://www.abc.inf.in/test">."

    " < intest version ="2.00"Id ="testabc"xmlns: xsi =" http://www.w3.org/2001/XMLSchema-instance "  >

    < ide >

    < cUF > 35 < / cUF >

    < cNF > 59386422 < / cNF >

    < natOp > This is post < / natOp >

    < indPag > 1 < / indPag >

    < mod > 55 < / mod >

    < set > 1 < / series >

    < / ide >...

    .....................

    Giving not complete because it is too long.

    1. I registered successfully of the schemas in the database

    2. then I generate the saved schema table

    2. in my java code I have validated the document XML schema compared and it's valid successfully.

    3 but when I recorded this XML file in the generated table there me gives error

    As:

    INSERT INTO XMLTABLE

    VALUES

    (XMLTYPE (bfilename('MYDIR','testabc.xml'), NLS_CHARSET_ID ('AL32UTF8')))

    Error report:

    SQL error: ORA-31061: error XDB: XML error event

    ORA-19202: an error has occurred in the processing of XML

    LSX-00333: literal '94032000' is not valid with regard to the model

    And I have to store this xml in tables of this so what I have to do?

    Thanks for your reply odie_63.

    I got this my solution for the error. My XML document is not well structured based on my registered XML schema.

    Average in My XML Document is an invalid value and which do not match my schema model so it gives this error

    SQL error: ORA-31061: error XDB: XML error event

    ORA-19202: an error has occurred in the processing of XML

    LSX-00333: literal '94032000' is not valid with regard to the model

    For the Solution, we have two ways

    1. I changed this literal value "94032000" in my xml file, then save it.

    2.

    -To delete this schema can

    -We need to change the schema for the particular element model

    like: -.

    -then to store xml in the database, it works...

    Thank you.

  • xmlObject - value of the element with a particular attribute

    Hello

    In an xmlObject, I try to set the value of the element xml with a special attribute, but it does not work

    //get value of element with a particular attribute
    var myValue = xmlObject.ELEMENTS.ELEMENT.(@category == "myCategory"))// works fine
    //set value of element with a particular attribute
    var myValue = "foo"
    xmlObject.ELEMENTS.ELEMENT.(@category == "myCategory"))= myValue // doesn't work
    

    Thanks for your help

    Concerning

    The E4X (?) XML syntax is powerful, but you can easily get lost with the bad node types. That is why my answer included the .writeln $ nature - 'list' - and used an index for the change; After validation, I found that your assignment would have also worked on the only indexed element. Thanks for sharing your discovery with setChildren() - who apparently works also on the lists.

    Dirk

  • Elements of repeatable subform and XML with the missing fields?

    I'm not an expert but I have one condition where a form will bind to a repetitive xml element, called transactions with elements under each transaction as shown below.

    I can't go to a situation where the XML is missing an optional for one of the p.6.  While I expect the form to display this:

    27/07/2011Deposit5000
    28/07/2011Check
    29/07/2011Transfer1000

    It is, in fact, show this:

    27/07/2011Deposit5000
    28/07/2011Check1000
    29/07/2011Transfer

    So, it is basically boils the credit of 1000 for the 2nd element repetitive rather than leave it empty and add correctly in the 3rd repetitive element.  I don't know that that is how I have the shape or how do I implement the XML binding but can anyone help?  I'm close this by forcing the user to always include an empty element that is repeatable, but it is optional in the schema is not a good thing to force on my callers.

    Thank you very much for the help!

    - < Transactions >

    - < Transaction >
    < Are later to > 2011-07-27 < / are later to >
    < Description > deposit < / Description >
    < > Credit5000.00< /credit>

    < / transaction >

    - < Transaction >
    < Are later to > 2011-07-28 < / are later to >
    < Description > check < / Description >

    < / transaction >

    - <Transaction>

    < Are later to > 2011-07-29 < / are posterior to >

    < Description > transfer < / Description >

    <Credit>1000.00</Credit>

    < / transaction >

    < / > transactions



    Hi, make sure you have to have the line or repeat the subform (just what is the parent of the three fields) related to the element of the Transaction, it must have a binding expression that looks to $. Transaction [*] then the three fields will have the relative binding expression that are similar to the $. Are later and keep them all grouped together on the same line (or a subform).  If the individual fields have expressions of shape connection $. Transaction [*]. Postdatent then you will get the problem describe you. Kind regards. Bruce

  • Identify the elements of the document, mark it as XML?

    Hi all

    Currently working on a project Web-to-print with InDesign CS5 server and JavaScript.

    I want to do is to allow following to happen:

    • A user downloads a document .indd (OK with that!).

    • A JS script traverses the document and identifies all the elements of the document (text boxes, images, etc.).

    • The user is then asked to select which elements of the document they would like to mark as "editable".

    • The items that the user has selected as editable are marked in the .indd as XML elements.

    • The .indb is saved and closed.

    I am relatively new to InDesign scripting, and I hope that this is not something so unusual that I'm trying to achieve! Does anyone have advice/ideas on how this could be done?

    Thank you very much

    Well, Yes, I think (I have not memorized... XML syntax) but... is not usually what you would mark your XML elements.

    I mean, generally you can do something like:

    ...
    ...
    ...
    

    If you wanted the counts. But you would not create new tags for each object:

    ...my rectangel data
    ...rect2 data
    ...text data...
    

    It will definitely hurt to parse your XML code with standard tools. Use an attribute instead. Or why even make them unique like that? I'm not sure t The Way of XML?

    Seems in any case, that, as you found your foot.

  • Where can I find descriptions of the elements of schema Permision

    I do not completely understand permisions them in authorization object.

    example:

    Display-> length-> minInclusive?

    Display-> devicetype?

    I don't know what mean these fields. Could you please help me for a reference doc?

    Technical reference information does not include these explanation list only fields and the schema.

    A full description of the permissions is located in the user's manual (section 11.1 permissions).  As you noted a fromal grammar (RNG) for permisions them THAT XML is the Ref. Tech.

    (Note: there is no 'minInclusive' element in any of the permissions)

  • Problem in creating several attributes XML with the same name of the attribute

    I am trying without success trying to create several attributes XML with the same name, as shown here in a Microsoft example configuration file:



      
         
         
         
      

    I'm calling the NewDocument GetRootElement functions and then "newelement" (appSetting), "newelement" (add)

    Then I call AddAttribute with add, key & Key0, then with add, value & 0.  This seems to work fine but when I try to add the second pair of key & Key1 and value attributes & 1 for item "Add" replaces ""and I find myself with"" only.

    I do something wrong or CVI is not able to create an XML of this type?

    Thank you

    Here's how you do it. I show not to keep things simple error checking.

    #include

    public static void CreateAddElement (mother of CVIXMLElement, const char * key, const char * value)
    {
    Add the CVIXMLElement;
    CVIXMLNewElement (parent, -1, 'Add', &add);)
    CVIXMLAddAttribute (add, "touch", key);
    CVIXMLAddAttribute (add, "value", value);
    CVIXMLDiscardElement (add);
    }

    void main (void)
    {
    CVIXMLElement root, and appSetting;
    Doc CVIXMLDocument.
     
    CVIXMLNewDocument ("configuration", &doc);)
    CVIXMLGetRootElement(doc, &root);)
    CVIXMLNewElement (root,-1, "appSetting", and appSetting);
    CreateAddElement (appSetting, "Key0", "0");
    CreateAddElement (appSetting, "Key1", "1");
    CreateAddElement (appSetting, "Key2", "2");
    CVIXMLDiscardElement (appSetting);
    CVIXMLDiscardElement (root);
    CVIXMLSaveDocument (doc, 1, "c:\\temp\\temp.xml");
    CVIXMLDiscardDocument (doc);
    }

  • Root element is missing. System.Xml.XmlException: The root element is missing.

    Hello

    I have .NET 3.5 Web service hosted in my machine (Windows XP SP3) DEV .net 3.5 sp1... When I try to access the service form my

    client is the exception as below...

    Root element is missing. System.Xml.XmlException: The root element is missing.
    at System.Xml.XmlTextReaderImpl.Throw (Exception e)
    at System.Xml.XmlTextReaderImpl.ThrowWithoutLineInfo (String res)
    at System.Xml.XmlTextReaderImpl.ParseDocumentContent)
    at System.Xml.XmlTextReaderImpl.Read)
    to System.Xml.XmlTextReader.Read)
    at System.Xml.XmlReader.MoveToContent)
    at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse (SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
    at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke (String methodName, Object [] parameters)

    Can any one opinion on this issue... Am I missing any software update...

    Thanks in advance...

    Kind regards

    Richard Starck M.

    Hi RAMANSELVA,

    Your question is more complex than what is generally answered in the Microsoft Answers forums. It is better suited for the IT audience Pro on MSDN. Please post your question in the MSDN forum.

    http://social.msdn.Microsoft.com/forums/en-us/netfxsetup/threads

  • Prevention of ListView, select the element for multi select

    How do you keep a user to select specific items during a statement select multi. You can use the MultiSelectHandler to do?

    I have essentially two types of elements. Setting caching and QUERIES.  When the user performs a Multi Select on a cached item... I want only their selection to other cached items.  Even if the user is running a Multi Select statement on an item not cached... I want only their selection of other items not cached.

    Is anyway to do this?  Been Googling for half an hour and can't find that everything about this use case.

    Since I use an element of custom list, I went to this subject a little differently. My CustomListItem implements a ListItemListener. I've implemented the select method as such.

    void CustomStandardListItem::select(bool select) {
        bb::cascades::ListItemListener* lil = static_cast(m_sli);
        bb::cascades::ListView * view = qobject_cast(this->parent());
    
        if (view->multiSelectHandler()->isActive()) {
            bool isCached = view->property("isMultiSelectTypeCached").toBool();
    
            if (m_cachedImageView->isVisible() && isCached) { // is cached.. allow selection of other cached objects only
                lil->select(select);
            }
            else if (!m_cachedImageView->isVisible() && !isCached) { // is not cached.. allow selection other cached objects only
                lil->select(select);
            }
        }
        else {
            lil->select(select);
        }
    }
    

    The dynamic property 'isMultiSelectTypeCached' is just a bool on ListView value that gets defined the type of ListItemComponent. It could have just as well been the type of ListItemComponent.

  • How to set the two attributes of the element in the same domain

    Hello

    I need to call a js function and need to set the width of the element.

    Now I have to do the following things.

    OnChange = "set_hscode (this)" "

    style = "width: 80px".

    Can someone tell me how to proceed?

    Thank you

    Suman

    sumanbangladesh wrote:

    It is to do it in the attributes of an element of the page HTML form elements

    Y at - there some problem with defining the attributes of HTML form elements on:

    onchange="set_hscode(this);" style="width:80px"

Maybe you are looking for