dbertoni    2002/08/12 22:37:38

  Modified:    c/src/XalanTransformer XalanTransformer.cpp
                        XalanTransformer.hpp
  Log:
  Implemented new options for output.  Includes both extensions for xsl:output and 
programmatic interfaces.
  
  Revision  Changes    Path
  1.57      +115 -1    xml-xalan/c/src/XalanTransformer/XalanTransformer.cpp
  
  Index: XalanTransformer.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XalanTransformer/XalanTransformer.cpp,v
  retrieving revision 1.56
  retrieving revision 1.57
  diff -u -r1.56 -r1.57
  --- XalanTransformer.cpp      12 Aug 2002 03:59:51 -0000      1.56
  +++ XalanTransformer.cpp      13 Aug 2002 05:37:38 -0000      1.57
  @@ -864,7 +864,121 @@
   void
   XalanTransformer::setIndent(int      indentAmount)
   {
  -     m_stylesheetExecutionContext->setIndent(indentAmount);;
  +     m_stylesheetExecutionContext->setIndent(indentAmount);
  +}
  +
  +
  +
  +XalanTransformer::eEscapeURLs
  +XalanTransformer::getEscapeURLs() const
  +{
  +     eEscapeURLs             escapeValue = eEscapeURLsDefault;
  +
  +     switch(m_stylesheetExecutionContext->getEscapeURLs())
  +     {
  +     case StylesheetExecutionContextDefault::eEscapeURLsDefault:
  +             break;
  +
  +     case StylesheetExecutionContextDefault::eEscapeURLsNo:
  +             escapeValue = eEscapeURLsNo;
  +             break;
  +
  +     case StylesheetExecutionContextDefault::eEscapeURLsYes:
  +             escapeValue = eEscapeURLsYes;
  +             break;
  +
  +     default:
  +             assert(false);
  +             break;
  +     }
  +
  +     return escapeValue;
  +}
  +
  +
  +
  +void
  +XalanTransformer::setEscapeURLs(eEscapeURLs          value)
  +{
  +     StylesheetExecutionContextDefault::eEscapeURLs  escapeValue =
  +             StylesheetExecutionContextDefault::eEscapeURLsDefault;
  +
  +     switch(value)
  +     {
  +     case eEscapeURLsDefault:
  +             break;
  +
  +     case eEscapeURLsNo:
  +             escapeValue = StylesheetExecutionContextDefault::eEscapeURLsNo;
  +             break;
  +
  +     case eEscapeURLsYes:
  +             escapeValue = StylesheetExecutionContextDefault::eEscapeURLsYes;
  +             break;
  +
  +     default:
  +             assert(false);
  +             break;
  +     }
  +
  +     m_stylesheetExecutionContext->setEscapeURLs(escapeValue);
  +}
  +
  +
  +
  +XalanTransformer::eOmitMETATag
  +XalanTransformer::getOmitMETATag() const
  +{
  +     eOmitMETATag    omitValue = eOmitMETATagDefault;
  +
  +     switch(m_stylesheetExecutionContext->getOmitMETATag())
  +     {
  +     case StylesheetExecutionContextDefault::eOmitMETATagDefault:
  +             break;
  +
  +     case StylesheetExecutionContextDefault::eOmitMETATagNo:
  +             omitValue = eOmitMETATagNo;
  +             break;
  +
  +     case StylesheetExecutionContextDefault::eOmitMETATagYes:
  +             omitValue = eOmitMETATagYes;
  +             break;
  +
  +     default:
  +             assert(false);
  +             break;
  +     }
  +
  +     return omitValue;
  +}
  +
  +
  +
  +void
  +XalanTransformer::setOmitMETATag(eOmitMETATag                value)
  +{
  +     StylesheetExecutionContextDefault::eOmitMETATag         omitValue =
  +             StylesheetExecutionContextDefault::eOmitMETATagDefault;
  +
  +     switch(value)
  +     {
  +     case eOmitMETATagDefault:
  +             break;
  +
  +     case eOmitMETATagNo:
  +             omitValue = StylesheetExecutionContextDefault::eOmitMETATagNo;
  +             break;
  +
  +     case eOmitMETATagYes:
  +             omitValue = StylesheetExecutionContextDefault::eOmitMETATagYes;
  +             break;
  +
  +     default:
  +             assert(false);
  +             break;
  +     }
  +
  +     m_stylesheetExecutionContext->setOmitMETATag(omitValue);
   }
   
   
  
  
  
  1.40      +60 -0     xml-xalan/c/src/XalanTransformer/XalanTransformer.hpp
  
  Index: XalanTransformer.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XalanTransformer/XalanTransformer.hpp,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- XalanTransformer.hpp      10 May 2002 21:13:16 -0000      1.39
  +++ XalanTransformer.hpp      13 Aug 2002 05:37:38 -0000      1.40
  @@ -598,6 +598,66 @@
        setIndent(int   indentAmount);
   
        /**
  +      * Enums to determine whether or not run-time escaping of URLs has been set.
  +      */
  +     enum eEscapeURLs
  +     {
  +             eEscapeURLsDefault,             // Use the value in the stylesheet
  +             eEscapeURLsNo,                  // Don't escape URLs
  +             eEscapeURLsYes                  // Escape URLs
  +     };
  +
  +     /**
  +      * Get the value for run-time escaping of URLs.  This can
  +      * override the property specified by the stylesheet.  The
  +      * default behavior is to honor the property in the stylesheet.
  +      *
  +      * @return The value of the enum
  +      */
  +     eEscapeURLs
  +     getEscapeURLs() const;
  +
  +     /**
  +      * Set the value for run-time escaping of URLs.  This can
  +      * override the property specified by the stylesheet.  The
  +      * default behavior is to honor the property in the stylesheet.
  +      *
  +      * @param value The value of the enum
  +      */
  +     void
  +     setEscapeURLs(eEscapeURLs       value);
  +
  +     /**
  +      * Enums to determine whether or not run-time omission of the META tag has 
been set.
  +      */
  +     enum eOmitMETATag
  +     {
  +             eOmitMETATagDefault,    // Use the value in the stylesheet
  +             eOmitMETATagNo,                 // Don't omit the META tag
  +             eOmitMETATagYes                 // Omit the META tag
  +     };
  +
  +     /**
  +      * Get the value for run-time omission of URLs.  This can
  +      * override the property specified by the stylesheet.  The
  +      * default behavior is to honor the property in the stylesheet.
  +      *
  +      * @return The value of the enum
  +      */
  +     eOmitMETATag
  +     getOmitMETATag() const;
  +
  +     /**
  +      * Get the value for run-time omission of URLs.  This can
  +      * override the property specified by the stylesheet.  The
  +      * default behavior is to honor the property in the stylesheet.
  +      *
  +      * @param value The value of the enum
  +      */
  +     void
  +     setOmitMETATag(eOmitMETATag             value);
  +
  +     /**
         * Set the ostream instance for reporting warnings and messages.  The default
         * is std::cerr.  If set to null, no warnings or messages will be written.
         * 
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to