Validating XML and skipping new lines & white spaces ?

Hi everybody !
I'm currently developping a new application and the configuration is done within a XML file. My problem is that I'm using IP addresses and so users have to write things like this :
<agentIP>
132.137.43.2
</agentIP>
and I have a problem with the Java SAX parser : in fact I have declared the type of agentIP in a XML Schema like this :
<xs:simpleType name="IPAddress">
<xs:restriction base="xs:string">
<xs:pattern value="((1?[0-9]?[0-9]|2[0-4][0-9]|25[0-5]).){3}(1?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])"/>
</xs:restriction>
</xs:simpleType>
and the problem is that if there are some white spaces before the IP or some new lines (in fact the user can format this XML file in different manners), I have a parsing error because the parser interprets these characters too.
Has somebody any idea how to tell the parser to skip these characters ???
for information here is my source code :
ErrorHandler errorHandler = new MyErrorHandler();
    content.setLength(0);
    agentTable = new AgentTable();
    SAXParserFactory factory = SAXParserFactory.newInstance();
    factory.setNamespaceAware(true);
    factory.setValidating(true);
    SAXParser saxParser = null;
    try {
      saxParser = factory.newSAXParser();
    catch (ParserConfigurationException ex1) {
      ex1.printStackTrace();
    catch (SAXException ex1) {
      ex1.printStackTrace();
    try {
      saxParser.setProperty(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);
      try {
        saxParser.setProperty(
            "http://java.sun.com/xml/jaxp/properties/schemaSource",
            new org.xml.sax.InputSource(jamap.share.Constants.networkMap));
      catch (SAXNotRecognizedException ex4) {
      catch (SAXNotSupportedException ex4) {
    catch (SAXNotSupportedException ex3) {
      ex3.printStackTrace();
    catch (SAXNotRecognizedException ex3) {
      ex3.printStackTrace();
    org.xml.sax.XMLReader xmlReader = null;
    try {
      xmlReader = saxParser.getXMLReader();
    catch (SAXException ex) {
      ex.printStackTrace();
    xmlReader.setContentHandler(this);
    xmlReader.setErrorHandler(errorHandler);
    //    xmlReader.setProperty(
    //      "http://apache.org/xml/properties/schema/external-schemaLocation",
    //    new File("http://localhost:8080/agentfile.xml"));
    //xmlReader.setErrorHandler (new (ErrorHandler()));
    try {
      xmlReader.parse(new org.xml.sax.InputSource(jamap.share.Constants.homeDir +
                                                  jamap.share.Constants.
                                                  AgentFile));
    catch (SAXException ex2) {
      ex2.printStackTrace();
      System.out.println("Please correct your XML file !");
    catch (IOException ex2) {
      ex2.printStackTrace();
      System.out.println("Error in parsing the agent.xml file");
    return agentTable;
  public void startElement(java.lang.String uri,
                           java.lang.String localName,
                           java.lang.String qName,
                           Attributes attributes
                           ) throws
      SAXException {
    if (qName.equals("proxy")) {
      isAgentViaProxy = true;
    content.setLength(0);
  public void characters(char[] chars, int start, int len) throws SAXException {
    content.append(chars, start, len);
  public void ignorableWhitespace(char[] ch,
                                  int start,
                                  int length) throws SAXException {
    System.out.println("Some white spaces were ignored !");
  }and here the XML Schema used:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:simpleType name="IPAddress">
  <xs:restriction base="xs:string">
    <xs:pattern value="((1?[0-9]?[0-9]|2[0-4][0-9]|25[0-5]).){3}(1?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])"/>
  </xs:restriction>
</xs:simpleType>
<xs:element name='networkMap'>
  <xs:complexType>
   <xs:sequence>
     <xs:element ref='agent' minOccurs='0' maxOccurs='unbounded'/>
   </xs:sequence>
  </xs:complexType>
</xs:element>
<xs:element name="agent">
  <xs:complexType>
   <xs:sequence>
     <xs:element name="ipAddress" type="IPAddress" minOccurs="1" maxOccurs="1" />
     <xs:element name="proxy" type="IPAddress" minOccurs="0" maxOccurs="1" />
   </xs:sequence>
  </xs:complexType>
</xs:element>
</xs:schema>THANK YOU...
PA

Hi !
I've found the solution finally and as nobody wrote me I'll explain it...
Basically to ignore white spaces you need to specify it within your XML Schema : here is an example of a possible description for an IPv6 address inside an XML schema :
<xs:simpleType name="IPv6Address">
  <xs:restriction base="xs:string">
   <xs:whiteSpace value="collapse" fixed="true"/>
   <xs:pattern value="((1?[0-9]?[0-9]|2[0-4][0-9]|25[0-5]).){7}(1?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])"/>
  </xs:restriction>
</xs:simpleType>as you can see <xs:whiteSpace value="collapse" fixed="true"/> is solving the problem !!
Bye..
PA
http://www.doffoel.com

Similar Messages

  • Validating a XML document and skipping new lines ??

    Hi everybody !
    I'm currently developping a new application and the configuration is done within a XML file. My problem is that I'm using IP addresses and so users have to write things like this :
    <agentIP>
    132.137.43.2
    </agentIP>
    and I have a problem with the Java SAX parser : in fact I have declared the type of agentIP in a XML Schema like this :
    <xs:simpleType name="IPAddress">
    <xs:restriction base="xs:string">
    <xs:pattern value="((1?[0-9]?[0-9]|2[0-4][0-9]|25[0-5]).){3}(1?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])"/>
    </xs:restriction>
    </xs:simpleType>and the problem is that if there are some white spaces before the IP or some new lines (in fact the user can format this XML file in different manners), I have a parsing error because the parser interprets these characters too.
    Has somebody any idea how to tell the parser to skip these characters ???
    for information here is my source code :
    ErrorHandler errorHandler = new MyErrorHandler();
        content.setLength(0);
        agentTable = new AgentTable();
        SAXParserFactory factory = SAXParserFactory.newInstance();
        factory.setNamespaceAware(true);
        factory.setValidating(true);
        SAXParser saxParser = null;
        try {
          saxParser = factory.newSAXParser();
        catch (ParserConfigurationException ex1) {
          ex1.printStackTrace();
        catch (SAXException ex1) {
          ex1.printStackTrace();
        try {
          saxParser.setProperty(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);
          try {
            saxParser.setProperty(
                "http://java.sun.com/xml/jaxp/properties/schemaSource",
                new org.xml.sax.InputSource(jamap.share.Constants.networkMap));
          catch (SAXNotRecognizedException ex4) {
          catch (SAXNotSupportedException ex4) {
        catch (SAXNotSupportedException ex3) {
          ex3.printStackTrace();
        catch (SAXNotRecognizedException ex3) {
          ex3.printStackTrace();
        org.xml.sax.XMLReader xmlReader = null;
        try {
          xmlReader = saxParser.getXMLReader();
        catch (SAXException ex) {
          ex.printStackTrace();
        xmlReader.setContentHandler(this);
        xmlReader.setErrorHandler(errorHandler);
        //    xmlReader.setProperty(
        //      "http://apache.org/xml/properties/schema/external-schemaLocation",
        //    new File("http://localhost:8080/agentfile.xml"));
        //xmlReader.setErrorHandler (new (ErrorHandler()));
        try {
          xmlReader.parse(new org.xml.sax.InputSource(jamap.share.Constants.homeDir +
                                                      jamap.share.Constants.
                                                      AgentFile));
        catch (SAXException ex2) {
          ex2.printStackTrace();
          System.out.println("Please correct your XML file !");
        catch (IOException ex2) {
          ex2.printStackTrace();
          System.out.println("Error in parsing the agent.xml file");
        return agentTable;
      public void startElement(java.lang.String uri,
                               java.lang.String localName,
                               java.lang.String qName,
                               Attributes attributes
                               ) throws
          SAXException {
        if (qName.equals("proxy")) {
          isAgentViaProxy = true;
        content.setLength(0);
      public void characters(char[] chars, int start, int len) throws SAXException {
        content.append(chars, start, len);
      public void ignorableWhitespace(char[] ch,
                                      int start,
                                      int length) throws SAXException {
        System.out.println("Some white spaces were ignored !");
      }and here the XML Schema used:
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:simpleType name="IPAddress">
      <xs:restriction base="xs:string">
        <xs:pattern value="((1?[0-9]?[0-9]|2[0-4][0-9]|25[0-5]).){3}(1?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])"/>
      </xs:restriction>
    </xs:simpleType>
    <xs:element name='networkMap'>
      <xs:complexType>
       <xs:sequence>
         <xs:element ref='agent' minOccurs='0' maxOccurs='unbounded'/>
       </xs:sequence>
      </xs:complexType>
    </xs:element>
    <xs:element name="agent">
      <xs:complexType>
       <xs:sequence>
         <xs:element name="ipAddress" type="IPAddress" minOccurs="1" maxOccurs="1" />
         <xs:element name="proxy" type="IPAddress" minOccurs="0" maxOccurs="1" />
       </xs:sequence>
      </xs:complexType>
    </xs:element>
    </xs:schema>THANK YOU...
    PA

    Hi !
    I've found the solution finally and as nobody wrote me I'll explain it...
    Basically to ignore white spaces you need to specify it within your XML Schema : here is an example of a possible description for an IPv6 address inside an XML schema :
    <xs:simpleType name="IPv6Address">
      <xs:restriction base="xs:string">
       <xs:whiteSpace value="collapse" fixed="true"/>
       <xs:pattern value="((1?[0-9]?[0-9]|2[0-4][0-9]|25[0-5]).){7}(1?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])"/>
      </xs:restriction>
    </xs:simpleType>as you can see <xs:whiteSpace value="collapse" fixed="true"/> is solving the problem !!
    Bye..
    PA
    http://www.doffoel.com

  • Reconfigure sales BOM deletes line item and creates new line item

    We are having issue with Sales BOM. Once sales BOM is reconfigure, line item is automatically deleted and creates new line item. These changes are not captured by reporting tool. Is it standard SAP behavior? if its not standard behavior, how to fix this issue?

    Hi,
    If i am not wrong, i assume you are using site instead of plant.   If it is plant , then "yes", we can have a order with same material being line item 10 and 20 with different plants.  Reg delivery, if the plants are configured to a same shipping point then you will have one delievery.  if the plants are configured for a different shipping point , then delivery will be split up.
    Reward if it helps,
    Thanks & regards,
    CLN

  • BOM Change - Delete an item(s) and insert new line items

    Hi,
    We need to mass update BOMs like for some of the existing BOM's we need to delete some line items and insert new line items. We want to use the BOMMAT04 IDOC in LSMW but I'd like to know couple of things before I go ahead with that approach
    For instance, I've a finished good material 12345678 and it has three components
                          a) Item 0010 Material 30101010 of quantity 10
                          b) Item 0020 Material 30101011 of quantity 11
                          C) Item 0030 Material 30101012 of quantity 12
    Now, I'd like delete Item 0010 and add a new item 0040 Material 30101013 of quantity 13. 
    In the segment E1STKOM, there is LOEKZ (Deletion Flag) but I dont want to flag for deletion but instead delete the whole line item and add a new line item.
    Is there any way to achieve this using BOMMAT04 IDOC? If not, can you please suggest me a better way to do it
    Any help is greatly appreciated
    Thanks,
    Srinivas

    Dear Srinivas,
    1.IF you want to change for an individual BOM,use CS02,select the item which you want to delete,select the entire and click on
    delete button and then add new line items and save.
    2.For Mass changes of BOM you can use CS20.
    3.Check these functional module's also if you want to change using a report,
    CS_BI_BOM_CHANGE_BATCH_INPUT   Change bill of material via batch input    
    CSEP_MAT_BOM_SELECT_CHANGE     API Bills of Material: Select BOM(s)    
    CS_CL_P_BOM_MASS_CHANGE     
    CS_CL_S_BOM_CHANGE_COMPLETE 
    Check and revert back,.
    Regards
    Mangalraj.S

  • Cancelling a line and and adding new lines to existing PO using API

    Hi,
    Can any one please help me know how I can cancel a line and insert new lines into a existing PO using any API.
    Many Thanks,
    Srinivas.

    VanessaC_VZW wrote:
      However, if you do not want a contract on the new lines, (since you will have your own equipment), the activation fee will be $35.00 per line.  If you agree to a 2-year contract for the share lines, the activation fees will be $25.00 per line.   
    You can add the new lines by calling our Telesales Department at 800-256-4646.  
    Thank you,
    Really?!  I didn't know that made a difference...I thought secondary lines were $25 - well, ya learn something new every day!
    And a side note - we added a line for my 75+ yr old mother with one of our old flip phones and CS was extremely kind in waiving the activation fee (I could have sworn it was $25 charged and credited on the bill), PLUS they boxed up the flip phone after activating it (with an out of state number to boot) and shipped it to my Mom, all at no additional cost to me.  I'm not saying that will be everyone's experience, and I was amazed the service rep offered to ship it for me - but I smiled and said "THANK YOU!" and accepted it!

  • [svn:fx-4.x] 14255: Fix for ?xml and !DOCTYPE lines reversed in ASDoc DITA output

    Revision: 14255
    Revision: 14255
    Author:   [email protected]
    Date:     2010-02-18 12:39:52 -0800 (Thu, 18 Feb 2010)
    Log Message:
    Fix for <?xml> and <!DOCTYPE> lines reversed in ASDoc DITA output
    QE notes: None.
    Doc notes: None.
    Bugs: SDK-25548
    Reviewed By: Paul
    Tests run: checkintests
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-25548
    Modified Paths:
        flex/sdk/branches/4.x/modules/compiler/src/java/flex2/compiler/asdoc/TopLevelClassesGener ator.java

    Running the script by python2 solves it for me:
    su - mythtv -c "nice -n 19 python2 /usr/bin/tv_grab_nl_py --output ~/listings.xml"
    Best regards,
    Cedric

  • Insert and retrieve new line character in DB2

    Hi,
    I have a requirement in my project where I need to generate flat files to be sent to the bank for validation and for each record type in the flat file, I want to have a line separator inserted in the file. Now, the line seperator is configurable as a system option as per customers needs which is stored in the database (we are using DB2). Even though, I inserted '\n' (New line character) in the system option as a line separator, while retrieving from database through JDBC and appending to the flat file, it is not recognizing it as a new line character and simply appends '\n\ in the flat file.
    Please suggest any solution for this.

    >
    Why with notepad I don't see 1 record per line? how to solve this problem?
    Hi,
    this is the problem, seems so clear.
    To use wordpad as standard editor is not an answer, neither for me, nor for other people who receives mail.
    No solution is a better answer.
    Best Regards
    Fabio Boni
    Edited by: Fabio Boni on Sep 6, 2010 10:46 AM
    Edited by: Fabio Boni on Sep 6, 2010 10:47 AM

  • Footer text-alignment in fluid grid layout and another color in white space, not the body

    I'm working in a fluit grid layout. Everythings works almost perfekt. Accept for de alignment in Opera mini. Mini works not with %. So it must be padding, line-height and something else. But then the footer does not stick.
    In Opera mini
    If i want the footer to stick to for example the bottom. I'm may not use padding in de footer.
    De <p> i used for alignment in from the text. Now my footer must have a alignment in the middle of the footer (center). With padding in footer, it wil work, but then my footer will not stick to the bottom anymore.
    and i have also another question, about the white spaces in de fluid grid. I don't want to give the header, body, footer another color. But that outside of my website.
    With a normal website you give the html and the body grey and the content white. But if i do this with the fluid grid. The content because grey. Is there also a code for.
    This is what it must be. It is a example, not for real. But i really want to know the code for it.

    I found the wright code for the footer. Thanks a lot. I'm happy.
    I'm also searching for a code for max-height. For example one page i have less text, so the page is not filled to the bottom. I want for designing reasons this. So the page is always fitt from header to footer.
    It must not scrolled. Just complete for the desktop-computer and laptop. Is there a code for. Because there is already internet-tv and that are big-screens. It must be for all the browser also ie7, ie 6, opera, safari, chrome and more.

  • How to Reject Quotation line item and update New line item

    Hi all,
    I have a doubt in Quotation Rejection,Here it goes....
    For VC implementation,We are Creating a quotation with Dummy Material,and after Creating Material Masters we have to update the Newly created material back in Quotation for same quotation number and after this the dummy material i.e the previous line item should be rejected with reason as a duplicate(reason code 23)..
    So Pls help me in Rejecting the line item of quotation.how this is done.
    Reply soon.
    Thanks in Advance,
    Balaji Meda

    Hi,
    The requirement is also to Update the Quotation with the newly created material.
    So we need a Bapi or a function module which does 2 things:
    1. Reject the previous Line item with a reason code.
    2. Update the Quoation with the new material and insert a a new line item.
    Thanks,
    Balaji.

  • How to changing char. values and create new lines in C_TH_DATA

    Hi experts,
    we need to distribute the cost of some sender costcenters to the corresponding receiver costcenters.
    We have already created a DSO and maintained this with the sender and receiver costcenter. We use this lookup table later in the execute method of our created planning function type to take the sender costcenter and distribute this to the corresponding receiver costcenters.
    I've already implemented an IP planning function based on planning function type for this process.
    At the end when I debug the method I see that this works fine. I give you an example:
    I have in my lookup table the following record:
    sender costcenter           receiver costcenter            distribution percent
    4711                                    4712                                    75
    4711                                    4713                                    25
    Based on those records in the lookup table I've to distribute the cost of sender costcenter to the receiver costcenters.
    Just imagine I would get this record from c_th_data:
    sender costcenter    costelement     value
           4711                 3000111         100
    I have to have the following result after running the exit planning function:
       costcenter    costelement     value
           4711                 3000111         100                   -> without changing
           4711                 8000111        -100
           4712                 8000111           75
           4713                 8000111           25
    When I debug the exit function I see in the execute method that c_th_data will be filled correctly. I see exactly the records that I want to see.
    But once the function is finished I don't see this result. I also checked the conversation
    Changing Char Value in IP C_TH_DATA
    but I can't understand what happens after my coding yet.
    Can anyone help me or give me an advice what could be the problem here?
    Thank you all in advance for your support.
    Kind regards,
    Ali

    Hi Ali,
    The planning function generates the records in delta mode. I am explaining the concept taking your example only:
    Records in cube before running PF:
    sender costcenter           receiver costcenter            distribution percent
    4711                                    4712                                    75
    4711                                    4713                                    25
    sender costcenter    costelement     value
           4711                 3000111         100
           4712                 3000111         100
           4713                 3000111         100
    The records that you need to generate from code(Previous ones need to be changed):
    sender costcenter    costelement     value
           4711                 3000111         000
           4712                 3000111         175
           4713                 3000111         125
    **Please note that you dont need to generate any corrections(delta records), you only need to generate the final values in the records and the PF will generate the delta's on its own. Also in this case you should see 3 Records Read, 0 Deleted, 3 Changed.
    Please let me know if you need any more clarification,
    Thanks,
    Puneet

  • Tab And New Line in XML data

    I have a formatted text which I store as a text node. By default the new line char's are converted into white spaces. I read elsewhere on this forum, that we should use the charecter entity reference equivalent &#A; for new line. I did not understand this idea clearly, so I tried this out:
    In my formatted string, I replaced all instances of '\n' with '&#A;'. I create my text node as follows:
    script.replaceAll("\n","&#A;");
    scriptElement = document.createTextNode(script);
    As expected when the XML is written the &#A10; is further encoded into "&#A10". And when I read back my XML from the parser, I get my string back with all the "&#A10;". I again need to do a replace all to get the new line charecters back.
    My question is : Is there any other standard solution to this problem or the bottom line is to replace the new line and tabs with "MUMBOJUMBO" or a standard charecter entity ref and look for the same while reading back.
    Is there anyway I could tell my XMLwriter to convert '\n' into "&#A;" and get back '\n' when I parse the XML?

    by default, all white spaces collapse: http://www.w3.org/TR/xsl/slice7.html#white-space-collapse
    you can use xml:space="preserve" in your XML elements (tags) or
    you can use <fo:block white-space-collapse="false" linefeed-treatment="preserve"> in XSL if you use XSL to format the XML.

  • How to insert a new line character inside CDATA tag in the source xml data file?

    values for form fields in the xml data file is contained inside CDATA tags which is an Unparsed Format.
    Eg: [CDATA[IBM-01 ~ DSHFSJDSJ ~ FGFGFJ, ~ VA 665665]] delimited by "~" char
    Actual o/p:-
    IBM-01 ~ DSHFSJDSJ ~ FGFGFJ, ~ VA 665665
    Expected o/p is like :-
    IBM-01
    DSHFSJDSJ
    FGFGFJ,
    VA 665665
    live cycle product does not interpret ~ as a newline character. Please suggest which character should be used instead inside CDATA section or if there is any other way to fix this?

    I do not have any problem while using IE's XML parser
    for XML+XSLT merging.That is because IE's parser does not implement XML correctly.
    But when I use JAXP's Transformer object, it does not
    preserve the new lines inside attribute values and
    converts those into white spaces.That is exactly what the XML specifications say should happen.
    >
    ----If you have text that contains newlines, you
    should put it in an element, not in
    ----an attribute.
    That would be my last solution. But I'd really hate
    to change my logic just 'coz JAXP is not capable of
    handling new lines inside attribute values. I may be
    wrong... but If IE can keep those then there has to
    be a way to do the same from server side merging....Sure. Write your own parser with the same bug in it. But you don't have any right to demand that other people supply you with parsers that work incorrectly.

  • Need a chrome and safari hack to eliminate white space, or?

    Hi,
    This page renders fine in IE8 and Firefox, but in Chrome and Safari there is white space before the Welcome bar.
    http://67.199.64.241/indexspry.asp
    Any thoughts?
    Thanks!
    Here is my CSS -- the styling for the section with the welcome bar is highlighted:
    margin:0;
    padding:0;
    body {
    font-family:Verdana, Arial, Helvetica, sans-serif;
    background-color: #F3D1D8;
    font-size: .75em;
    line-height: 2em;
    color: #323532;
    position: relative;
    margin: 0;
    padding: 0px;
    text-align:center; /* for IE5 */
    behavior: url("csshover3.htc"); /* makes hover class work in IE 6,7 and 8 */
    #container {
    width: 1000px;
    background: #fff;
    margin: 0 auto;
    text-align:left;
    # header {
    background: #fff;
    a {
    text-decoration: none
    /* Typography -------------------------------------------*/
    .textbold {
    font-weight: bold;
    .ital {
    font-style:italic;
    line-height: 1.2em;
    font-family: Georgia, "Times New Roman", Times, serif;
    /* Headings -------------------------------------------*/
    h1 {
    margin: 0; /* 2 does not bring it down -- nor does adding a border*/
    font-family:Verdana, Arial, Helvetica, sans-serif;
    background-color: #323532;
    color: #F4F4F4;
    font-size: 2em;
    font-weight: bold;
    line-height: 2.5em;
    h2 {
    font-family:Verdana, Arial, Helvetica, sans-serif;
    background-color: #4E2029; /*dark purple*/
    color: #f4f4f4;
    font-size: 1.5em;
    font-weight: bold;
    h3 {
    font-family:Verdana, Arial, Helvetica, sans-serif;
    background-color: #D5647C; /*dusty rose*/
    color: #000000;
    font-size: 1em;
    font-weight: bold;
    h4 {
    font-family:Verdana, Arial, Helvetica, sans-serif;
    color: #323532;
    font-size: 1em;
    font-weight: bold;
    /* h5 is good for drawing a burgundy line */
    h5 {
    background-color: #4E2029;
    font-size: .5em;
    line-height: .5em;
    /* h6 is good for drawing a line the same color as the background */
    h6 {
    font-family:Verdana, Arial, Helvetica, sans-serif;
    background-color: #F3D1D8; /*pink*/
    color: #f4f4f4;
    font-size: .5em;
    font-weight: bold;
    border-top-width: medium;
    border-top-style: solid;
    border-top-color: #FFF;
    line-height: .5em;
    /* Links -------------------------------------------*/
    a:link {
    color: #d5647c;
    font-weight: bold;
    a:visited {
    color: #8A2488;
    font-weight: bold;
    a:hover {
    color: #684148;
    font-weight: bold;
    a:active {
    color: #CC0000;
    font-weight: bold;
    /* Top Navigation -------------------------------------------*/
    #navtop {
    margin:0 0 2px;
    padding: 0;
    background: #4E2029; /* dark purple, pms 504 */
    list-style-type: none;
    width: 1000px; /*used to be 684 */
    float: left; /*contain floated list items */
    #navtop li {
    margin: 0;
    padding: 0;
    float: left;
    margin-left: 0px;
    padding-left: 0px;
    background: #4E2029; /* dark purple, pms 504 */
    list-style-position: outside;
    #navtop a {
    float: left;
    width: 170px;
    color: #ffffff;
    text-decoration: none;
    line-height: 2.5;
    text-align: center;
    border-right: 1px solid #fff;
    font-weight: bold;
    #navtop #nav_don a {
    border: none; /* take out line after last menu item */
    #navtop a:hover {
    background: #D5647C; /* dusty rose, pms 702 */
    /* Lists ----------------------------------------------
    /* This accounts for brower differences in handling left margin indentation */
    ul {
    margin: 0;
    padding: 0;
    list-style-type: none;
    list-style-position: outside;
    li {
    background: url(/images/bulletpt.gif) no-repeat 0 9px;
    margin-left: 5px;
    padding-left: 15px;
    list-style-position: outside;
    /* other elements ------------------------- */
    #boxx {
    background: #323532; /*dark gray */
    width: 200px;
    float: right; /*contain floated list items */
    z-index: 10;
    padding: 0px 8px 0px 12px;
    border-bottom:3px solid #323532;
    border-top-width: 3 px;
    border-top-style: solid;
    border-top-color: #323532;
    line-height: 1.4em;
    margin: 2px;
    #boxx li {
    margin: auto;
    color: #424642; /*med gray */
    font-weight: bold;
    float: left; /* this section corrects IE whitespace bug */
    background: #F2DFE3; /*lt gray */
    list-style-position: outside;
    list-style-type: none;
    width: 185px;
    #boxx a {
    color: #4E2029;
    display: block;
    text-decoration: none;
    #boxx a:hover {
    background: #B85067; /* dark pink*/
    color: #FFFFFF;
    #search {
    float: right;
    width: 200px;
    padding: 0px 8px 0px 12px;
    border-bottom:3px solid #323532;
    border-top-width: 3 px;
    border-top-style: solid;
    border-top-color: #323532;
    margin: 2px;
    .graybox {
    margin: 15px 0 0 0;
    padding: 5px 0 0px 0;
    background:url(/images/graychecks.gif);
    .rosebox {
    margin: 15px 0 0 0;
    padding: 5px 0 0px 0;
    background:url(/images/rosechecks.gif);
    /* Need something for box styles, form styles and maybe graphical buttons. */
    .checklist {
    font-family:Verdana, Arial, Helvetica, sans-serif;
    background-color: #ffffff;
    font-size: 0.75em;
    line-height: 1.2em;
    color: #323532;
    position: relative;
    margin: 0;
    padding: 0px;
    list-style-type: circle;
    .sig {
    font-family: "Comic Sans MS", cursive;
    font-weight: bold;
    /* from main2col.css =---- */
    margin:0;
    padding:0;
    /* Left Navigation-------------------------------------*/
    #navleft {
    /* position: absolute; */
    left:0;
    top: 185px;
    /*margin:0 0 -750px; */
    /*background: #323532; /* dark gray, pms 447 */
    /*width: 170px;
    color: #ffffff;
    font-weight: bold;
    float: left; /*contain floated list items */
    /*#navleft ul {
    list-style-type:none;
    list-style: none;
    margin: 0;
    padding: 0;
    /*#navleft li { */
    /* float: left; *//* this section corrects IE whitespace bug */
    /*width: 100%; */
    /*list-style-position: outside;*/
    /* position: relative;
    list-style-type:none;
    margin: 0;
    padding: 0;
    /*#navleft a {
    display: block;
    color: #ffffff;
    text-decoration: none;
    padding: 0 7px;
    line-height: 2.5;
    padding: 15 10 15 20;
    border-bottom:1px solid #fff;
    background: #4E2029; *//* dark purple, pms 504 */
    /*#navleft #nav_news a {
    border: none; *//* take out line after last menu item */
    #navleft a:hover {
    background: #D5647C;*/ /* dusty rose, pms 702 */ /*
    /* for submenus */
    /*#navleft ul ul ul {
    position: absolute;
    top: 0;
    left: 100%;
    width: 100%;
    #optionalmenupicture {
    width: 14em;
    #navoptional {
    /*position: relative;
    left:0;
    top: 0;
    margin:0;
    padding: 0;  */
    background: #58DA2C; /*med lime green */
    list-style-type: none;
    width: 155px;
    color: #ffffff; /* white */
    font-weight: bold;
    float: left; /*contain floated list items */
    #navoptional li {
    margin: 2px;
    padding: 0;
    float: left; /* this section corrects IE whitespace bug */
    width: 100%;
    background: #D5647C; /*dark rose */
    list-style-position: outside;
    list-style-type: square;
    #navoptional a {
    display: block;
    text-decoration: none;
    padding: 0 10px;
    line-height: 2;
    border-bottom:1px solid #323532;
    /* #navoptional #nav_news a {
    border: none; /* take out line after last menu item */
    #navoptional a:hover {
    background: #4e2029; /* dark purple */
    /* Main Content ---------------------------------------*/
    #primaryContent {
    background: #fff;
    float: left;
    margin-left: 172px;
    padding: 0;
    position:relative;
    top: -334px;
    /* footer --------------------------------- */
    #footer {
    padding: 0 10px; /* this padding matches the left alignment of the elements in the divs that appear above it. */
    background:#ffffff;
    .hide {
    font-size: 0em;
    line-height: 0em;
    .box {
    margin: 15px 0 0 0;
    padding: 5px 0 0px 0;
    background:url(/images/ltchecks.gif);
    .mogul {
    font-family:Andale Mono, Trebuchet MS, Comic Sans MS, Impact;
    font-size: xx-small;
    /* Forms ---------------------- */
    input {
    background-color: #f5f5f5;
    color: #4E2029;
    font: Verdana, Arial, Helvetica, sans-serif;
    font-size:12px;
    textarea {
    background-color: #f5f5f5;
    color: #4E2029;
    width: 300px;
    height: 100px;
    font: Verdana, Arial, Helvetica, sans-serif;
    font-size:12px;
    /* from Adobe */
    .fltrt { /* this class can be used to float an element right in your page. The floated element must precede the element it should be next to on the page. */
    float: right;
    margin-left: 8px;
    .fltlft { /* this class can be used to float an element left in your page */
    float: left;
    margin-right: 8px;
    .clearfloat { /* this class should be placed on a div or break element and should be the final element before the close of a container that should fully contain a float */
    clear:both;
        height:0;
        font-size: 1px;
        line-height: 0px;

    You've got a bigger problem.  See attached screenshot from Firefox when text size is increased in browser (Zoom, text only)
    Start by using the code valiation tools below and fix reported errors.  90% of browser rendering problems are code related.  If your code is clean, chances are good that your pages will perform reasonably well in all the major browsers.
    HTML Validator - http://validator.w3.org 
    CSS Validator - http://jigsaw.w3.org/css-validator/  
    HTML & CSS Tutorials - http://w3schools.com/
    Conditional Comments are only recognized by MS Internet Explorer.  You can't use CCs to target other browsers.  But this is a moot point since your problem isn't caused by bugs in either Safari or Chrome.
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    www.alt-web.com/
    www.twitter.com/altweb
    www.alt-web.blogspot.com

  • New to XML - what can XML and java do thogether - brief examples please

    I am new to XML and relatively new to Java, thought not new to programming. I am still trying to figure out what can XML do for me in practical terms and when I should use it. Thanks for any examples of when to use XML in conjunction with Java.

    xml : Think of it in terms of business solutions, the way you would think of HTML for drawing fun web-pages.
    java : If you know anything about databases you would know you can embed java with sql E.T.C.
    Therefore because of the fast response times and the amount of constant interaction for business purposes you will need a database type that is strong to handle XML, therefore with such new technology you will be able to use xml databases with java too.
    l am sorry : XML Technology is not more simple than that to explain.
    If you are a christian or jew it is like saying to someone explain the bible,the prophets,the old and new testament in one sentence!!!You get it.What one can do is slightly break-up the bible and say there's an old and new testament.The old testament refers to the time before Jesus, AND the new testament refers to After Jesus, THE PROPHETS RELATE MORE TO THE TIME BEFORE Jesus.
    You can then ask me who is jesus???
    And thats a tricky question in its self becuse it depends on one's thinking(concept)
    I HOPE IT HELPS YOU !!!!
    GOD DAY MATE!!

  • SAX / Validating XML file...

    Hello,
    I would like to use the SAX Parser to validate a XML file. So I've downloaded the last sax.jar library and included it in the java 1.4 directory.
    If I set the setvalidating flag to false the parser is working great and i have good results. However I would like to validate the XML file with a XML Schema (that can be accessed using the web). So I saw the Sun tutorial for doing that but have a terrible error ! :
    java.lang.ClassCastException
         at org.apache.xerces.impl.xs.XMLSchemaValidator.reset(XMLSchemaValidator.java:1332)
    and don't understand why, can somebody help me ????
    public class AgentHandler
        extends DefaultHandler
        implements ContentHandler {
      private boolean isAgent;
      private boolean isAgentViaProxy;
      private AgentTable agentTable;
      private String agent;
      private String proxy;
      static final String JAXP_SCHEMA_LANGUAGE =
          "http://java.sun.com/xml/jaxp/properties/schemaLanguage";
      static final String W3C_XML_SCHEMA =
          "http://www.w3.org/2001/XMLSchema";
      static final String JAXP_SCHEMA_SOURCE =
          "http://java.sun.com/xml/jaxp/properties/schemaSource";
      private String representation;
      private StringBuffer content = new StringBuffer();
      MimeBodyPart part;
      Unit currentUnit;
      Consumer nextConsumer;
      protected Object object;
      public AgentTable getAgentTable() {
        ErrorHandler errorHandler = new MyErrorHandler();
        content.setLength(0);
        agentTable = new AgentTable();
        SAXParserFactory factory = SAXParserFactory.newInstance();
        factory.setNamespaceAware(true);
        factory.setValidating(true);
        SAXParser saxParser = null;
        try {
          saxParser = factory.newSAXParser();
        catch (ParserConfigurationException ex1) {
          ex1.printStackTrace();
        catch (SAXException ex1) {
          ex1.printStackTrace();
        try {
          saxParser.setProperty(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);
    //agentfile.xml is the XML Schema
    saxParser.setProperty(
         "http://apache.org/xml/properties/schema/external-schemaLocation",
              new File(
              "http://localhost:8080/agentfile.xml"));
        catch (SAXNotSupportedException ex3) {
          ex3.printStackTrace();
        catch (SAXNotRecognizedException ex3) {
          ex3.printStackTrace();
        org.xml.sax.XMLReader xmlReader = null;
        try {
          xmlReader = saxParser.getXMLReader();
        catch (SAXException ex) {
          ex.printStackTrace();
        xmlReader.setContentHandler(this);
        xmlReader.setErrorHandler(errorHandler);
        try {
          xmlReader.parse(new org.xml.sax.InputSource(jamap.share.Constants.homeDir +
                                                      jamap.share.Constants.
                                                      AgentFile));
        catch (SAXException ex2) {
          ex2.printStackTrace();
          System.out.println("Error in parsing the agent.xml file");
        catch (IOException ex2) {
          ex2.printStackTrace();
          System.out.println("Error in parsing the agent.xml file");
        return agentTable;
      }any idea ???
    Thanks...
    PA

    Hello,
    I did some modifications and now it is working : the setproperty was not properly called before....
    Now I have an other problem : in fact the parser doesn't ignore the white spaces, even if I put an ignorableWhitespace method inside the handler : have you any idea to remove these new lines or spaces automatically during the parsing ????
    TU...
    PA
    public AgentTable getAgentTable() {
        ErrorHandler errorHandler = new MyErrorHandler();
        content.setLength(0);
        agentTable = new AgentTable();
        SAXParserFactory factory = SAXParserFactory.newInstance();
        factory.setNamespaceAware(true);
        factory.setValidating(true);
        SAXParser saxParser = null;
        try {
          saxParser = factory.newSAXParser();
        catch (ParserConfigurationException ex1) {
          ex1.printStackTrace();
        catch (SAXException ex1) {
          ex1.printStackTrace();
        try {
          saxParser.setProperty(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);
          try {
            saxParser.setProperty(
                "http://java.sun.com/xml/jaxp/properties/schemaSource",
                new org.xml.sax.InputSource("http://localhost:8080/agentfile.xml")
          catch (SAXNotRecognizedException ex4) {
          catch (SAXNotSupportedException ex4) {
        catch (SAXNotSupportedException ex3) {
          ex3.printStackTrace();
        catch (SAXNotRecognizedException ex3) {
          ex3.printStackTrace();
        org.xml.sax.XMLReader xmlReader = null;
        try {
          xmlReader = saxParser.getXMLReader();
        catch (SAXException ex) {
          ex.printStackTrace();
        xmlReader.setContentHandler(this);
        xmlReader.setErrorHandler(errorHandler);
        try {
          xmlReader.parse(new org.xml.sax.InputSource(jamap.share.Constants.homeDir +
                                                      jamap.share.Constants.
                                                      AgentFile));
        catch (SAXException ex2) {
          ex2.printStackTrace();
          System.out.println("Error in parsing the agent.xml file");
        catch (IOException ex2) {
          ex2.printStackTrace();
          System.out.println("Error in parsing the agent.xml file");
        return agentTable;

Maybe you are looking for

  • HELP!! My player only starts in safe mode and won't do anything!

    <FONT face="Comic Sans MS" size=3>I dropped my nomad zen xtra (which i have to say has happened before), but this time it locked up - i couldn't shut it down or do anything else. Now when I start it, it only starts in safe mode, but it won't do anyth

  • Viewing iPhone Content On iPad?

    Going abroad with my iPhone and my iPad and I am asking: can I view my iPhone content on my iPad? assuming with wi-fi or even better, without it? Thanks, Amnon

  • Movie storage maxed out

    My movie storage on my Ipad is maxed out. I tried to download Peter Pan for the kids but got prompted not enough storage. How do you remedy this? If I delete the other movies, can I download them at a latter date again from my past purchases? I alrea

  • N97 Software devs - Use THUMB!

    I was thinking the other day that we have a 256MB NAND which makes up C: and Z: which is partitioned at 73MB for C: and at-least 118MB for Z: drive, making up 191MB as of F/W version 21.0.045. This leaves 65MB free therefore why can't Z: reserved spa

  • Trouble with ACIs and dynamic groups

    Hi! Does Dirctory Server stop searching for subgroups after evaluating a dynamic group? Example: A User "uid=A,o=company" is member of a dynamic group "cn=dyn,o=company" via memberURL: "ldap:///o=company??sub?(uid=A)". The dynamic group "cn=dyn,o=com