Set the "xsl:strip-space" properties.
@see <a href="http://www.w3.org/TR/xslt#strip">strip in XSLT Specification</a>

@param wsi WhiteSpaceInfo element to add to list
550242
public void setStripSpaces(WhiteSpaceInfo wsi)
  {

    if (null == m_whitespaceStrippingElements)
    {
      m_whitespaceStrippingElements = new Vector();
    }

    m_whitespaceStrippingElements.addElement(wsi);
  }
884042
def strip_whitespace
      self.pattern           = pattern.strip unless pattern.nil?
      self.archive_directory = archive_directory.strip unless archive_directory.nil?
    end
1056864
private function SkipWhitespace()
	{
		do
		{
			// if ( XmlCharType.Instance.IsWhiteSpace( $this->Peek( 0 ) ) )
			if ( preg_match( "/\s/", $this->Peek( 0 ) ) )
			{
				$c;
				while ( ( $c = $this->Peek( 0 ) ) && ord( $c ) != 0 && preg_match( "/\s/", $c ) )
				{
					$this->Read();
				}
				continue;
			}
			if ( $this->Peek( 0 ) == '(' && $this->Peek( 1 ) == ':' )
			{
				$this->Read();
				$this->Read();
				$n = 1;
				while ( true )
				{
					$c = $this->Peek( 0 );
					if ( ord( $c ) == 0 )
					{
						break;
					}
					else if ( $c == '(' && $this->Peek( 1 ) == ':' )
					{
						$this->Read();
						$this->Read();
						$n++;
					}
					else if ( $c == ':' && $this->Peek( 1 ) == ')' )
					{
						$this->Read();
						$this->Read();
						if ( --$n == 0 )
						{
							break;
						}
					}
					else
					{
						$this->Read();
					}
				}
				if ( $n )
				{
					throw XPath2Exception::withErrorCodeAndParam( "XPST0003", Resources::XPST0003, "Comment not closed" );
				}
				continue;
			}
			break;
		}
		while ( true );
	}
731917
private byte[] stripWhiteSpaces(byte[] data) {
        ByteArrayOutputStream bos = new ByteArrayOutputStream();
        for (byte b : data) {
            if (!WHITESPACES.contains(b)) {
                bos.write(b);
            }
        }
        return bos.toByteArray();
    }
648185
public void addNamespace( String prefix, String uri, String elementName ) {
      if( StringUtils.isBlank( uri ) ){
         return;
      }
      if( prefix == null ){
         prefix = "";
      }
      if( StringUtils.isBlank( elementName ) ){
         rootNamespace.put( prefix.trim(), uri.trim() );
      }else{
         Map nameSpaces = (Map) namespacesPerElement.get( elementName );
         if( nameSpaces == null ){
            nameSpaces = new TreeMap();
            namespacesPerElement.put( elementName, nameSpaces );
         }
         nameSpaces.put( prefix, uri );
      }
   }
566079
def _delete_whitespace(self):
        """"""
        while isinstance(self._lines[-1], (self._Space, self._LineBreak,
                                           self._Indent)):
            del self._lines[-1]
1084937
public void removeTrailingWhitespaces()
    {
        int last = -1;
        for (int i = text.length() - 1; i >= 0; i--)
        {
            if (isWhitespace(text.charAt(i)))
                last = i;
            else
                break;
        }
        if (last != -1)
        {
            text = text.substring(0, last);
            textStart = 0;
            textEnd = last;
        }
    }
848799
private void initNamespaces()
    {
        // The initial prefix mappings will never be deleted because they are at element depth -1
        // (a kludge)

        // Define the default namespace (initially maps to "" uri)
        Stack stack;
        MappingRecord nn;
        nn = new MappingRecord(EMPTYSTRING, EMPTYSTRING, -1);
        stack = createPrefixStack(EMPTYSTRING);
        stack.push(nn);

        // define "xml" namespace
        nn = new MappingRecord(XML_PREFIX, "http://www.w3.org/XML/1998/namespace", -1);
        stack = createPrefixStack(XML_PREFIX);
        stack.push(nn);
    }
638512
protected void trimLeadingWhiteSpaces()
    {
        if (shouldRemoveWhiteSpaces() && getContent().length() > 0) {
            String result = trimLeadingWhiteSpaces(getContent());
            getContent().setLength(0);
            getContent().append(result);
        }
    }
531293
public static void stripWhitespaceNodes(Node element) {
        Node node, child;
        for (child = element.getFirstChild(); child != null; child = node) {
            node = child.getNextSibling();
            stripWhitespaceNodes(child);
        }

        if (element.getNodeType() == Node.TEXT_NODE && element.getNodeValue().trim().length()==0) {
            element.getParentNode().removeChild(element);
        }
    }
339465
protected function ws_trim(){
    if ( $this->ws_keep() ) return;
    
    switch(self::$_ws_state) {
      case self::WS_SPACE: 
        $node = $this->_node;
        
        if ( $node->nodeName === "#text" ) {
          $node->data = preg_replace("/[ \t\r\n\f]+/u", " ", $text);
          
          // starts with a whitespace
          if ( isset($node->data[0]) && $node->data[0] === " " ) {
            $node->data = ltrim($node->data);
          }
          
          // if not empty
          if ( $node->data !== "" ) {
            // change the current state (text)
            self::$_ws_state = self::WS_TEXT;
          
            // ends with a whitespace
            if ( preg_match("/[ \t\r\n\f]+$/u", $node->data) ) {
              $node->data = ltrim($node->data);
            }
          }
        }
      break;
      
      case self::WS_TEXT:
    }
  }
263676
void pushSpaceHandling(Attributes attrs)
    throws org.xml.sax.SAXParseException
  {    
    String value = attrs.getValue("xml:space");
    if(null == value)
    {
      m_spacePreserveStack.push(m_spacePreserveStack.peekOrFalse());
    }
    else if(value.equals("preserve"))
    {
      m_spacePreserveStack.push(true);
    }
    else if(value.equals("default"))
    {
      m_spacePreserveStack.push(false);
    }
    else
    {
      SAXSourceLocator locator = getLocator();
      ErrorListener handler = m_stylesheetProcessor.getErrorListener();
  
      try
      {
        handler.error(new TransformerException(XSLMessages.createMessage(XSLTErrorResources.ER_ILLEGAL_XMLSPACE_VALUE, null), locator)); //"Illegal value for xml:space", locator));
      }
      catch (TransformerException te)
      {
        throw new org.xml.sax.SAXParseException(te.getMessage(), locator, te);
      }
      m_spacePreserveStack.push(m_spacePreserveStack.peek());
    }
  }
494583
protected void addNamespaceContext() {
        NamespaceMap prefixmap = new NamespaceMap();
        NamespacePrefixList npl = getXsd().getNamespaceContext();
        if (npl == null) {
            /* We get an NPE if we don't add this. */
            prefixmap.add("", XMLConstants.W3C_XML_SCHEMA_NS_URI);
        } else {
            for (int i = 0; i < npl.getDeclaredPrefixes().length; i++) {
                prefixmap.add(npl.getDeclaredPrefixes()[i],
                        npl.getNamespaceURI(npl.getDeclaredPrefixes()[i]));
            }
        }
        prefixmap.add(getCOXBNamespacePrefix(), getCOXBNamespace());
        getXsd().setNamespaceContext(prefixmap);

    }
751985
public void setWhiteSpace(CSSProperty.WhiteSpace value)
    {
        splitws = (value == ElementBox.WHITESPACE_NORMAL || value == ElementBox.WHITESPACE_PRE_WRAP || value== ElementBox.WHITESPACE_PRE_LINE);
        collapsews = (value == ElementBox.WHITESPACE_NORMAL || value == ElementBox.WHITESPACE_NOWRAP || value == ElementBox.WHITESPACE_PRE_LINE);
        linews = (value == ElementBox.WHITESPACE_NORMAL || value == ElementBox.WHITESPACE_NOWRAP);
        //When this is the original box, apply the whitespace. For the copied boxes, the whitespace has been already applied (they contain
        //a copy of the original, already processed content). 
        if (!splitted)
            applyWhiteSpace();
        //recompute widths (possibly different wrapping)
        computeLineLengths();
        minwidth = computeMinimalWidth();
        maxwidth = computeMaximalWidth();
    }
1282641
protected List<JDToken> whiteSpace(Token token) {
        final List<JDToken> wss = new ArrayList<JDToken>();
        Token ws = token.specialToken;
        while(ws != null) {
            switch(ws.kind) {
            case WS:
                wss.add(_JDWhiteSpace(ws.image));
                break;
            default:
                // anything else is not whitespace and not our problem.
            }
            ws = ws.specialToken;
        }
        Collections.reverse(wss);
        return wss;
    }
1181131
@SuppressWarnings("unchecked")
  public <T extends CMAResource> T setSpaceId(String spaceId) {
    if (getSystem().getSpace() == null) {
      getSystem().space = new CMALink(CMAType.Space);
    }

    getSystem().space.setId(spaceId);

    return (T) this;
  }
318858
private function removeWhitespaceAroundTags(SimpleHtmlDom $element)
    {
        if (isset(self::$trimWhitespaceFromTags[$element->tag])) {
            $node = $element->getNode();

            /** @var \DOMNode[] $candidates */
            $candidates = [];
            if ($node->childNodes->length > 0) {
                $candidates[] = $node->firstChild;
                $candidates[] = $node->lastChild;
                $candidates[] = $node->previousSibling;
                $candidates[] = $node->nextSibling;
            }

            foreach ($candidates as &$candidate) {
                if ($candidate === null) {
                    continue;
                }

                if ($candidate->nodeType === \XML_TEXT_NODE) {
                    $candidate->nodeValue = \preg_replace(self::$regExSpace, ' ', $candidate->nodeValue);
                }
            }
        }
    }