Get() 공개 추상적인 메소드

public abstract Get ( String reference ) : String
reference String /// the reference to find a matching prefix for ///
리턴 String
예제 #1
0
        /// <summary>
        /// This is used to write the namespaces of the specified node to
        /// the output. This will iterate over each namespace entered on
        /// to the node. Once written the node is considered qualified.
        /// </summary>
        /// <param name="node">
        /// This is the node to have is attributes written.
        /// </param>
        public void WriteNamespaces(OutputNode node)
        {
            NamespaceMap map = node.Namespaces;

            foreach (String name in map.References)
            {
                String prefix = map.Get(name);
                writer.WriteNamespace(name, prefix);
            }
        }
예제 #2
0
        //public String GetPrefix() {
        //   return GetPrefix(true);
        //}
        /// This is used to acquire the prefix for this output node. If
        /// the output node is an element then this will search its parent
        /// nodes until the prefix that is currently in scope is found.
        /// If however this node is an attribute then the hierarchy of
        /// nodes is not searched as attributes to not inherit namespaces.
        /// </summary>
        /// <param name="inherit">
        /// if there is no explicit prefix then inherit
        /// </param>
        /// <returns>
        /// this returns the prefix associated with this node
        /// </returns>
        public String GetPrefix(bool inherit)
        {
            String prefix = scope.Get(reference);

            if (inherit)
            {
                if (prefix == null)
                {
                    return(parent.GetPrefix());
                }
            }
            return(prefix);
        }
예제 #3
0
        /// <summary>
        /// This method will resolve the prefix or the specified reference
        /// by searching the parent nodes in order. This allows the prefix
        /// that is currently in scope for the reference to be acquired.
        /// </summary>
        /// <param name="reference">
        /// the reference to find a matching prefix for
        /// </param>
        /// <returns>
        /// this will return the prefix that is is scope
        /// </returns>
        public String Resolve(String reference)
        {
            NamespaceMap parent = source.Namespaces;

            if (parent != null)
            {
                String prefix = parent.Get(reference);
                if (!table.ContainsValue(prefix))
                {
                    return(prefix);
                }
            }
            return(null);
        }
예제 #4
0
 //public String GetPrefix() {
 //   return scope.Get(reference);
 //}
 /// This is used to acquire the prefix for this output node. If
 /// the output node is an element then this will search its parent
 /// nodes until the prefix that is currently in scope is found.
 /// If however this node is an attribute then the hierarchy of
 /// nodes is not searched as attributes to not inherit namespaces.
 /// </summary>
 /// <param name="inherit">
 /// if there is no explicit prefix then inherit
 /// </param>
 /// <returns>
 /// this returns the prefix associated with this node
 /// </returns>
 public String GetPrefix(bool inherit)
 {
     return(scope.Get(reference));
 }
예제 #5
0
 //public void SetData(bool data) {
 //   return;
 //}
 /// This is used to acquire the prefix for this output node. If
 /// the output node is an element then this will search its parent
 /// nodes until the prefix that is currently in scope is found.
 /// If however this node is an attribute then the hierarchy of
 /// nodes is not searched as attributes to not inherit namespaces.
 /// </summary>
 /// <returns>
 /// this returns the prefix associated with this node
 /// </returns>
 public String GetPrefix()
 {
     return(scope.Get(reference));
 }