Exemplo n.º 1
0
void Tree::excludeStdNamespaces()
{
  NZ(getCurrentInfo()) -> 
    getExcludedNS().addUri(stdPhrase(PHRASE_XML_NAMESPACE));
  if (XSLTree)
    {
      NZ(getCurrentInfo()) -> 
	getExcludedNS().addUri(stdPhrase(PHRASE_XSL_NAMESPACE));
    }
}
Exemplo n.º 2
0
eFlag Tree::pushNamespacePrefixes(Sit S, Str& prefixes, XSL_ATT att)
{
  if (!XSLTree) return OK;

  PList<Str*> tokens;
  char *p, *q;
  q = (char*) prefixes;
  skipWhite(q);
  p = q;
  int i = strcspn(q, theWhitespace);
  while (*q && i) 
    {
      q += i;
      char save = *q;
      *q = 0;
      
      Str* aux = new Str(p);
      tokens.append(aux);

      *q = save;
      skipWhite(q);
      p = q;
      i = strcspn(q, theWhitespace);
    }
  //add to list
  SubtreeInfo *info = getCurrentInfo();
  for (i = 0; i < tokens.number(); i++)
    {
      Str tok = *(tokens[i]);
      Phrase prefix = 
	tok == (const char*) "#default" ? UNDEF_PHRASE : unexpand(tok);
      int idx = pendingNS().findNdx(prefix);
      if (idx != -1)
	{
	  switch (att) {
	  case XSLA_EXT_ELEM_PREFIXES:
	    {
	      info -> getExtensionNS().append(toNS(pendingNS()[idx]) -> uri);
	    }; //no break
	  case XSLA_EXCL_RES_PREFIXES:
	    {
	      info -> getExcludedNS().append(toNS(pendingNS()[idx]) -> uri);
	    }; break;
	  }
	}
      else
	{
	  Str aux = *(tokens[i]);
	  tokens.freeall(FALSE);
	  Err1(S, E_EX_NAMESPACE_UNKNOWN, (char*) aux);
	}
    }
  tokens.freeall(FALSE);
  //printf("----------------------------\n");
  return OK;
}
Exemplo n.º 3
0
PortableServer::Servant TIDorb::core::poa::CurrentImpl::get_servant() 
  throw (PortableServer::Current::NoContext)
{
  return getCurrentInfo()->_servant;
};
Exemplo n.º 4
0
PortableServer::ObjectId_ptr TIDorb::core::poa::CurrentImpl::get_object_id() 
  throw (PortableServer::Current::NoContext)
{
  return getCurrentInfo()->_current_oid.toByteArray();
};
Exemplo n.º 5
0
PortableServer::POA* TIDorb::core::poa::CurrentImpl::get_POA() 
  throw (PortableServer::Current::NoContext)
{
  return PortableServer::POA::_duplicate(getCurrentInfo()->_current_poa);
};
Exemplo n.º 6
0
Bool Tree::isExtensionUri(Phrase uri) 
{
  return getCurrentInfo() -> getExtensionNS().findNdx(uri) != -1;
}
Exemplo n.º 7
0
eFlag Tree::popNamespacePrefixes(Sit S)
{
  if (XSLTree)
    getCurrentInfo() -> popNamespaceMarks();
  return OK;
}