How do I get an attribute on a simple element?

I am trying to get an attribute on a simple element that has a type of "nonNegativeInteger". I've tried numerous ways to do this and the validator rejects them all.
I tried the following:
<element name="birthdate" minOccurs="1" maxOccurs="unbounded"
type="nonNegativeInteger">
<complexType>
<attribute name="format" type="string" use="default"
value="CCYYMMDD"/>
</complexType>
</element>
bit I get the following:
<Line 110, Column 38>: XSD-2027: (Error) Invalid element 'complexType' in 'element'
This was suggested previously:
<element name="birthdate" minOccurs="1" maxOccurs="unbounded"
base="nonNegativeInteger">
<complexType>
<attribute name="format" type="string" use="default"
value="CCYYMMDD"/>
</complexType>
</element>
where the type in the <element> is changed to base but it gives the message:
<Line 110, Column 39>: XSD-2026: (Error) Invalid attribute 'base' in element 'element'
The following works but does not provide any type checking for the data in the tag:
<element name="birthdate" minOccurs="1" maxOccurs="unbounded">
<complexType content="mixed">
<attribute name="format" type="string" use="default"
value="CCYYMMDD"/>
</complexType>
</element>
The following is accepted but the attribute definition is ignored and the XML is flagged as having an invalid attribute.
<element name="birthdate" minOccurs="1" maxOccurs="unbounded">
<simpleType base="nonNegativeInteger">
<attribute name="format" type="string" use="default"
value="CCYYMMDD"/>
</simpleType>
</element>
How can I have both attributes and type checking on a simple element?

Did you try the following:
<element name = "birthdate">
<complexType>
<complexContent>
<extension base="nonNegativeInteger">
<attribute name="format"
type="string"/>
use="default"
value="CCYYMMDD"/>
</extension>
</complexContent>
</complexType>
</element>
The element is defined to be a complexType and having complexContent because it has an attribute. The complexContent can have either extension or restriction as its children. They define the type of derivation of the element from the base.
Hope this helps..
Cheers,
Chetan
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Paul Anderson ([email protected]):
I am trying to get an attribute on a simple element that has a type of "nonNegativeInteger". I've tried numerous ways to do this and the validator rejects them all.
I tried the following:
<element name="birthdate" minOccurs="1" maxOccurs="unbounded"
type="nonNegativeInteger">
<complexType>
<attribute name="format" type="string" use="default"
value="CCYYMMDD"/>
</complexType>
</element>
bit I get the following:
<Line 110, Column 38>: XSD-2027: (Error) Invalid element 'complexType' in 'element'
This was suggested previously:
<element name="birthdate" minOccurs="1" maxOccurs="unbounded"
base="nonNegativeInteger">
<complexType>
<attribute name="format" type="string" use="default"
value="CCYYMMDD"/>
</complexType>
</element>
where the type in the <element> is changed to base but it gives the message:
<Line 110, Column 39>: XSD-2026: (Error) Invalid attribute 'base' in element 'element'
The following works but does not provide any type checking for the data in the tag:
<element name="birthdate" minOccurs="1" maxOccurs="unbounded">
<complexType content="mixed">
<attribute name="format" type="string" use="default"
value="CCYYMMDD"/>
</complexType>
</element>
The following is accepted but the attribute definition is ignored and the XML is flagged as having an invalid attribute.
<element name="birthdate" minOccurs="1" maxOccurs="unbounded">
<simpleType base="nonNegativeInteger">
<attribute name="format" type="string" use="default"
value="CCYYMMDD"/>
</simpleType>
</element>
How can I have both attributes and type checking on a simple element?<HR></BLOCKQUOTE>
null

Similar Messages

  • How can I get the attributes details like user name, mail , from sAMAccount csv or notepad file through powershell or any other command in AD?

    How can I get the attributes details like user name, mail , from sAMAccount csv or notepad file through powershell or any other command in AD?

    Ok what about If i need to get all important attributes by comparing Email addresses from excel file and get all required answers
    currently I am trying to verify how many users Lines are missing , Emp numbers , Phones  from AD with HR list available to me.
    I am trying to Scan all the AD matching HR Excel sheet and want to search quickly how many accounts are active , Line Managers names , Phone numbers , locations , title , AD ID .
    these are fields I am interested to get in output file after scanning Excel file and geting reply from AD in another Excel or CSV file
    Name’tAccountName’tDescri ption’tEma I IAddress’tLastLogonoate’tManager’tTitle’tDepartmenttComp
    any’twhenCreatedtAcctEnabled’tGroups
    Name,SamAccountName,Description,EmailAddress,LastLogonDate,Manager,Title,Department,Company,whenCreated,Enabled,MemberOf | Sort-Object -Property Name
    Can you modify this script to help me out :)
    Hi,
    Depending on what attributes you want.
    Import-Module ActiveDirectory
    #From a txt file
    $USERS = Get-Content C:\Temp\USER-LIST.txt
    $USERS|Foreach{Get-ADUser $_ -Properties * |Select SAMAccountName, mail, XXXXX}|Export-CSV -Path C:\Temp\USERS-ATTRIBUTES.csv
    #or from a csv file
    $USERS = Import-CSV C:\Temp\USER-LIST.csv
    $USERS|Foreach{Get-ADUser $_.SAMAccountName -Properties * |Select SAMAccountName, mail, XXXXX}|Export-CSV -Path C:\Temp\USERS-ATTRIBUTES.csv
    Regards,
    Dear
    Gautam Ji<abbr class="affil"></abbr>
    Thanks for replying I tried both but it did not work for me instead this command which i extended generated nice results
    Get-ADUser -Filter * -Property * | Select-Object Name,Created,createTimeStamp,DistinguishedName,DisplayName,
    EmployeeID,EmployeeNumber,Enabled,HomeDirectory,LastBadPasswordAttempt,LastLogonDate,LogonWorkstations,City,Manager,MemberOf,MobilePhone,PasswordLastSet,BadLogonCount,pwdLastSet,SamAccountName,UserPrincipalName,whenCreated,whenChanged
    | Export-CSV Allusers.csv -NoTypeInformation -Encoding UTF8
    only one problem is that Manager column is generating this outcome rather showing exact name of the line Manager .
    CN=Mr XYZ ,OU=Users,OU=IT,OU=Departments,OU=Company ,DC=organization,DC=com,DC=tk

  • In Jsp TagLib how can I get the Attribute value (like JavaBean) in jsp

    Dear Friends,
    TagLib how can I get the Attribute value (like JavaBean) in jsp .
    I do this thing.
    public void setPageContext(PageContext p) {
              pc = p;
    pc.setAttribute("id", new String("1") );
              pc.setAttribute("first_name",new String("Siddharth")); //,pc.SESSION_SCOPE);
              pc.setAttribute("last_name", new String("singh"));
    but in Jsp
    <td>
    <%=pageContext.getAttribute("first_name"); %>
    cause null is returing.
    Pls HELP me
    with regards
    Siddharth Singh

    First, there is no need to pass in the page context to the tag. It already is present. How you get to it depends on what type of tag:
    Using [url http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/jsp/tagext/SimpleTagSupport.html]SimpleTagSupport
    public class MyTag extends SimpleTagSupport
      public void doTag()
        PageContext pc = (PageContext)getJspContext();
        pc.setAttribute("first_name", "Siddharth");
        pc.setAttribute("last_name", "Singh");
        pc.setAttribute("id", "1");
    }Using [url http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/jsp/tagext/TagSupport.html]TagSupport or it's subclass [url http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/jsp/tagext/BodyTagSupport.html]BodyTagSupport the page context is aleady declared as an implicit object:
    public class MyTag extends TagSupport
      public void doStartTag()
        pageContext.setAttribute("first_name", "Siddharth");
        pageContext.setAttribute("last_name", "Singh");
        pageContext.setAttribute("id", "1");
    }In each case, this sort of thing should work:
    <mytags:MyTag />
    <%= pageContext.getAttribute("first_name") %>I

  • How can I get my 2001 copy of Photoshop Elements to run on my Windows 7 computer?

    How can I get my 2001 copy of Photoshop Elements to run on my Windows 7 computer?

    Your talking about photoshop elements 1?
    Did you install photoshop elements 1?
    What happens when you try to run it?
    Do you get the message "Scratch Disk is Full" or similar message?
    How much free space do you have on your hard drive?

  • How can I get rid of pink tint in Elements 6 "Editor" ?

    How can I get rid of pink tint in Elements 6 "Editor" ?  I received Elements 6 free with a scanner. It works o.k. on my Windows XP, except whenever I go to Editor workspace, the photo turns completely pink -- no other color.  I can use the various tools on the pink, but this is useless, as I don't want a pink photo. Can't even convert it to black & white -- just stays pink. I tried everything I could think of to get a normal color transfer to editor from the organizer, but no luck.  Please help. 

    This is an update to the pink tint problem.  The problem mysteriously FIXED ITSELF today, after being stubbornly pink for weeks.  I have no idea what happened, as I didn't do anything -- it was somehow already fixed when I started the program.  So maybe it will revert again, who knows, but hoping for the best.

  • How do I get my older copies of photoshop elements 6 & premiere elements 4 to be recognised by Adobe

    How do I get my older copies of Photoshop elements 6 & premiere elements 4 to be recognized by Adobe?  after re-install on a new computer it seems like the link to Adobe is no longer valid (for registration or update)
    Message was edited by: GDrex  after re-install on a new computer it seems like the link to Adobe is no longer valid (for registration or update)

    GDrex for your update failures I would recommend posting in the Photoshop Elements forum at http://forums.adobe.com/community/photoshop_elements.  The community members in this forum may have additional information regarding update failures for Photoshop Elements from that time period.

  • How do I get video clips into Organizer from Elements?

    I have broken my raw video into pieces in elements but can't get it to import into organizer.
    I am using Elements 11 Trial.

    The video is actually a football highlight film for our son and came to us as a single mp4 file with about 60 plays of video on it.
    What I am trying to do is
    1) Cut it down into 60 individual videos (which I did and currently have in my project).
    2) Save the pieces off as individual video clips.
    3) Get the ability to rank/rate each video and select the 25 or so that will make up the final video.
    4) Polish/edit those that make the grade.
    5) Organize and assemble.
    Does this make sense?
    t
    Date: Mon, 19 Nov 2012 14:44:31 -0700
    From: [email protected]
    To: [email protected]
    Subject: How do I get video clips into Organizer from Elements?
        Re: How do I get video clips into Organizer from Elements?
        created by whsprague in Premiere Elements - View the full discussion
    karaannmbb wrote: I have broken my raw video into pieces in elements but can't get it to import into organizer. I am using Elements 11 Trial.Place the "Work Area Bars" (located on the time line) so that only a "piece" is covered.  Then "Share" to a computer file. Pick a file type that suits your needs.  Be sure to check the box titled "Share WorkArea Bar Only".  Unfortunately, the clip piece will be re-encoded.  PrE11 will do that well, but not perfect because any encoding always seems to loose a little. You did not say what camera you are using.  The software that came with my Sony and Panasonic camcorders is much better for splitting clips into smaller clips.  Some sort of magic is in them where re-encoding does not take place.  The pieces have the same picture quality as the original.   So, when I do what you want, I break it into pieces with the camcorder software, the put the video together in PrE with all the creative tools it offers.  Bill
         Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/4859754#4859754
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4859754#4859754
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4859754#4859754. In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in Premiere Elements by email or at Adobe Community
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • How can I get the attribute of another app of the JSP server's session

    in one server, use Tomcat 4.1, have two application at
    .../webapps/app1
    .../webapps/app2
    when use login to application1, it'll set a attribute of session use following code:
    session.setAttribute("identitycode", IdentityCode);
    session.setMaxInactiveInterval(SessionTimeOut);
    and the other jsp programs which at app1 directory will try to get the attribute of this session to identity whether the user had login and get the identity code.
    I want to make user just login one time to use application1 and application2, but I didn't know how to get the attribute of session what seted at app1 in app2's programs.
    can you tell me how I can do this?

    If there are 2 different applications like app1 & app2, U need to use:
    application.setAttribute() method.(not session.getAttribute).
    u need to maintain one collection like hash table which will store the mappings of User & their IDs . U can then get the user details from app1 to app2

  • How can I get the Attribute Value in the existing XML Elements-Reg.

    Dear All,<br /><br />  I have the InDesign Document with xml Based, now I want to get the XML Elements name and XML Attributes for each Elements, using SDK Concepts. <br /><br />Example:<br /><br /> <chapter>  chapter1 </chapter> id = "ch001"<br /> <sec> Section ....</sec> id ="se001"<br /> <para> para ....</para> id="pa001"<br /><br />How can I get the XMLElements & XML Attributes in the InDesign-XML Structure.<br /><br />Please  any one can suggest me....<br /><br />Thanks & Regards<br />T.R.Harihara SudhaN

    Dear Dirk
    Many Thanks for the Suggestions, Now I search and study the XML concepts. Meanwhile, I need your suggestions for further Development in SDK -XML concepts.
    I am using the SnippetRunner -SDK file, their given some XML based programmes. [Create XML Elements, Elements + Attributes, XML Comments] and etc...
    Hope U will help me to Develop the SDK- XML Concepts.
    Thanks & Regards
    T.R.Harihara SuduhaN

  • How can I get sigalg attribute from a given X509 certificate

    Hi,
    I am verifying my client's digigital signature like this
    String sigalg = "SHA1WithRSA";
    Signature sig = Signature.getInstance(sigalg);
    sig.initVerify(pubKey);
    sig.update(sEnvelope.getBody().toString().getBytes());
    return sig.verify(Base64.decode(sigValue));
    while getting signature instance, rightnow I am hardcoding that to "SHA!withRSA", because I know that client is comming with that signatureAlgorithm, If another client comes with another alogorithm say "MD5withRSA", it is going to be failed. how can I change that sigAlg variable dynamically, based on different signature ?? what I have from the client is certificate file. how can I get signature algorithm from the certificate or from publicKey object ??
    Thanx, Venu

    Check the following methods in X509Certificate:
    getSigAlgName
    getSigAlgOID

  • Runtime error to get the attribute value of an element

    mydoc.xml
    =========
    <?xml version = "1.0"?>
    <persons>
         <person name="Joe" age="22" />
    </persons>
    In mydox.xml, I want to get the attribute values of element person. Of course,
    in the actual XML file, it is more complicated.
    However, I get the following run-time error,
    Exception in thread "main" java.lang.NullPointerException
    at ParserTest.main(ParserTest2.java:18) on line element.hasAttribute("name")
    import java.io.*;
    import javax.xml.transform.*;
    import javax.xml.transform.dom.*;
    import javax.xml.transform.stream.*;
    import org.w3c.dom.*;
    import javax.xml.parsers.*;
    import org.xml.sax.*;
    public class ParserTest2
         public static void main(String[] args) throws ParserConfigurationException, SAXException
              String xmlFile = "mydoc.xml";
              doc = getDocumentFromFile(xmlFile);
              Element element = doc.getElementById("person");
              //Exception in thread "main" java.lang.NullPointerException
              if (element.hasAttribute("name"))
              {     System.out.println("attribute = " + element.getAttribute("name"));
         public static Document getDocumentFromFile(String xmlFile)
                   try
                        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
                        DocumentBuilder builder = factory.newDocumentBuilder();
                        Document doc = builder.parse(new File(xmlFile));
                        return doc;
                   catch(IOException e)
                   {     e.printStackTrace();
                        return null;
                   catch(SAXException e)
                   {     e.printStackTrace();
                        return null;
                   catch(ParserConfigurationException e)
                   {     e.printStackTrace();
                        return null;
         private static Document doc;
    any ideas? Thanks!!

    [url http://java.sun.com/j2se/1.4.2/docs/api/java/lang/NullPointerException.html]java.lang.NullPointerException
    Thrown when an application attempts to use null in a case where an object is required. These include:
    Calling the instance method of a null object.
    Accessing or modifying the field of a null object.
    Taking the length of null as if it were an array.
    Accessing or modifying the slots of null as if it were an array.
    Throwing null as if it were a Throwable value.
    You know what line it happens on, so you know which of these cases applies. So you know that variable "element" is null at that point. How could it come to be null? You assign to it only once, two lines above. How could that assignment be null? Check the documentation for [url http://java.sun.com/j2se/1.4.2/docs/api/org/w3c/dom/Document.html#getElementById(java.lang.String)]org.w3c.dom.Document.getElementById().
    Repeat every time you get one of those exceptions.

  • How can I get the content of a text element to insert in a different block

    I have two blocks. The first one (block_control) is a non based block with a text element (EXERCICE). When I go to the second block (block_data) and I want to insert a new record, I need in my record the value of EXERCICE who is in the first block (block_control). How can I get this balue if I want to be able to do an execute_query too on the second block ? Because if I use pre-block or post-block or when-new-record-instance trigger to make the content of EXERCICE follow from block_control to block_data in a hidden field, I can't execute_query.
    Thank's

    First , when you want to insert a record in the second block , override the default commit_form processing and create a commit-form trigger which is called by a button to commit your form. The when-button-pressed trigger of this button should be : do_key('commit_form'); . And you create the key-commit trigger on the second block. Inside the key-commit trigger write this :
    :second_block.item_name := name_in('block_control_name.exercice');
    commit_form;
    In this way you get the exercice data into your record.
    Secondly, in the post-query trigger of the second block, set the exercice column of the second block to the exercice column of the block_control.
    And that's it.

  • How can I get a verification code for Photoshop Elements 7 ?

    I CAN NOT GET A VERIFICATION CODE FOR PHOTOSHOP ELEMENTS 7
    SO I CAN SEND EMAIL WITH PHOTO.  WOULD SOMEONE TELL ME HOW
    TO GET THE VERIFICATION CODE. I HAVE TRIED REPEATABLY TO
    ADOBE WITH NO RESPONSE.
    CHARLES TODD
    Email:   [email protected]

    I am talking about that when I try to share a Photo from the Organizer of Photoshop Elements 7
    thru the use of Email attachment, It will not transmit.  I get a message that tells me to enter
    a "Verification Code".  I do not have a verification code and have been unable to get one from adobe.
    This is Photoshop Elements 7 which I bought from Adobe. It was a packet of Photoshop Elements 7
    and Photoshop Premiere Elements 7. Any advice would be appreciate.
    Charles Todd....Email:   [email protected]

  • How can I  get a serial number for Photoshop Elements?

    I have a redemption code.  But ewhen I go online it asks for a serial number.  How do I get the serial numkber.  I bought this software.  It is NOT pirated.

    Try the link on this page. Sometimes it works when the one given in your receipt doesn't:
    http://helpx.adobe.com/x-productkb/policy-pricing/serial-number-retrieval-process-faq.html

  • How do I get Organizer to open on Photoshop Elements 12 loaded on a mac?

    How do you get Organizer to open - Photoshop 12 on a mac

    Moving this discussion to the Photoshop Elements forum.

Maybe you are looking for

  • Thunderbolt to VGA

    I got a Macbook Pro i7 2G Hz, and i want to connect it to a projector with VGA connection. I tried to find Thunderbolt to VGA on mac store but all what i got is mini display port to VGA. Is this one works with thunderbolt also, or i need another cabl

  • Wrong values for Total stock - Inventory managment ( negative values)

    Hi, I loaded inventory management load 2LIS_03_BF   INIT 01.06.2009 - 06.7.2009 No Marker Update (compressed with check) 2LIS_03_UM  INIT 01.06.2009 - 06.7.2009 No Marker Update (compressed with check) the first quantity received is from 11.06.2009 

  • Can't move/copy recent backup in iTunes

    I am trying to set my iPhone up as a new phone, and have backed up all my content on my phone but can't figure out how to find my most recent backup. I found where it states when my phone has been backed up, but I can't copy/move the content. I have

  • Query to find tables with excessive initial extent settings

    After loading a database dump we found many tables occupying large space due to large initial extents storage parameter but with very few rows and am trying to determine if it would be worth the effort to reorganize the entire schema. In other words,

  • Process flow/map performance issues

    We have some issues with our OWB-based application and we're looking to find out if there are different ways we could be using the tool, or features/options we've missed. We are trying to maintain a near real time feed of data from a front end system