You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Da...@lotus.com on 2001/02/01 19:33:27 UTC

Re: regular expression in template-match

By regular expression, I'm assuming you mean using a regular expression to
match the name of an element node?  If that's what you mean, you cannot use
regular expressions this way

Match patterns use a subset of the full XPath grammer.  In fact, even the
XPath grammer does support regular expressions, although there have been
discussions about expanding what kinds of node name tests you can do.

You should take a look at the XPath and XSLT recommendations, and/or read a
good book on XSLT.  Mike Kay's book, published by Wrox Press,  is one that
many people recommend.

Dave



                                                                                                                   
                    "Lyle Coder"                                                                                   
                    <x_coder@hotm        To:     <xa...@xml.apache.org>                                        
                    ail.com>             cc:     (bcc: David N Bertoni/CAM/Lotus)                                  
                                         Subject:     regular expression in template-match                         
                    01/10/2001                                                                                     
                    04:39 AM                                                                                       
                    Please                                                                                         
                    respond to                                                                                     
                    xalan-dev                                                                                      
                                                                                                                   
                                                                                                                   



Hi,
How do I specify a regular expression in the template-matches tag?

Thanks
Lyle




Re: Xalan C++ TranscodeFrom/To LocalCodePage (problem). (More info, again)

Posted by David Braaten <da...@multiactive.com>.
It seems that the line:
XalanDOMString theFileName = TranscodeFromLocalCodePage(c_str(outFileName));
is the one that produces the empty string in release mode.



----- Original Message -----
From: "David Braaten" <da...@multiactive.com>
To: <xa...@xml.apache.org>
Sent: Thursday, February 01, 2001 04:40 PM
Subject: Re: Xalan C++ TranscodeFrom/To LocalCodePage (problem). (More info)


>
> While the code below always seems to fail to produce a string,
> sometimes XalanFileOutputStream is successful in producing its
> filename.
> BUT, once the code below has been executed or XalanFileOutputStream
> has failed to produce a filename once, XalanFileOutputStream will never
> again be able to produce a filename other than an empty string.
>
> wierdness...
>
> ----- Original Message -----
> From: "David Braaten" <da...@multiactive.com>
> To: <xa...@xml.apache.org>
> Sent: Thursday, February 01, 2001 04:16 PM
> Subject: Xalan C++ TranscodeFrom/To LocalCodePage (problem).
>
>
> > In a release mode build on nt4sp5,vc6sp4(current cvs source),
> TranscodeFrom
> > or TranscodeTo is returning an empty string. Since XalanFileOutputStream
> is
> > using
> > TranscodeToLocalCodePage to get the filename it should use, this
> > is a slight problem...
> >
> > Of course, since it works fine in debug, it's probably some insane MS
bug,
> > but it would be nice if someone else could see if they get the same
> > behaviour.
> >
> > Here is a bit of code that will repro the problem. The third message box
> > will be
> > empty.
> > -----
> >
> >   CString strXMLFilename("c:\temp\temp.xml");
> >   CharVectorType outFileName;
> >
> >   CopyStringToVector((LPCTSTR)strXMLFilename, outFileName);
> >
> >   const char* const tmpName1 = &outFileName[0];
> >
> >   ::MessageBox( NULL, tmpName1, "1", MB_OK );
> >
> >   ::MessageBox( NULL, c_str(outFileName), "2", MB_OK );
> >
> >   XalanDOMString theFileName =
> > TranscodeFromLocalCodePage(c_str(outFileName));
> >
> >
> > // excerpted from XalanFileOutputStream:
> >
> >   const CharVectorType theResult(TranscodeToLocalCodePage(theFileName));
> >
> >   assert(theResult.size() > 0);
> >
> >   const char* const tmpName = &theResult[0];
> >
> >   ::MessageBox( NULL, tmpName, "3", MB_OK );
> >
> > -----
> >


Re: Xalan C++ TranscodeFrom/To LocalCodePage (problem). (More info)

Posted by David Braaten <da...@multiactive.com>.
While the code below always seems to fail to produce a string,
sometimes XalanFileOutputStream is successful in producing its
filename.
BUT, once the code below has been executed or XalanFileOutputStream
has failed to produce a filename once, XalanFileOutputStream will never
again be able to produce a filename other than an empty string.

wierdness...

----- Original Message -----
From: "David Braaten" <da...@multiactive.com>
To: <xa...@xml.apache.org>
Sent: Thursday, February 01, 2001 04:16 PM
Subject: Xalan C++ TranscodeFrom/To LocalCodePage (problem).


> In a release mode build on nt4sp5,vc6sp4(current cvs source),
TranscodeFrom
> or TranscodeTo is returning an empty string. Since XalanFileOutputStream
is
> using
> TranscodeToLocalCodePage to get the filename it should use, this
> is a slight problem...
>
> Of course, since it works fine in debug, it's probably some insane MS bug,
> but it would be nice if someone else could see if they get the same
> behaviour.
>
> Here is a bit of code that will repro the problem. The third message box
> will be
> empty.
> -----
>
>   CString strXMLFilename("c:\temp\temp.xml");
>   CharVectorType outFileName;
>
>   CopyStringToVector((LPCTSTR)strXMLFilename, outFileName);
>
>   const char* const tmpName1 = &outFileName[0];
>
>   ::MessageBox( NULL, tmpName1, "1", MB_OK );
>
>   ::MessageBox( NULL, c_str(outFileName), "2", MB_OK );
>
>   XalanDOMString theFileName =
> TranscodeFromLocalCodePage(c_str(outFileName));
>
>
> // excerpted from XalanFileOutputStream:
>
>   const CharVectorType theResult(TranscodeToLocalCodePage(theFileName));
>
>   assert(theResult.size() > 0);
>
>   const char* const tmpName = &theResult[0];
>
>   ::MessageBox( NULL, tmpName, "3", MB_OK );
>
> -----
>


Xalan C++ TranscodeFrom/To LocalCodePage (problem).

Posted by David Braaten <da...@multiactive.com>.
In a release mode build on nt4sp5,vc6sp4(current cvs source), TranscodeFrom
or TranscodeTo is returning an empty string. Since XalanFileOutputStream is
using
TranscodeToLocalCodePage to get the filename it should use, this
is a slight problem...

Of course, since it works fine in debug, it's probably some insane MS bug,
but it would be nice if someone else could see if they get the same
behaviour.

Here is a bit of code that will repro the problem. The third message box
will be
empty.
-----

  CString strXMLFilename("c:\temp\temp.xml");
  CharVectorType outFileName;

  CopyStringToVector((LPCTSTR)strXMLFilename, outFileName);

  const char* const tmpName1 = &outFileName[0];

  ::MessageBox( NULL, tmpName1, "1", MB_OK );

  ::MessageBox( NULL, c_str(outFileName), "2", MB_OK );

  XalanDOMString theFileName =
TranscodeFromLocalCodePage(c_str(outFileName));


// excerpted from XalanFileOutputStream:

  const CharVectorType theResult(TranscodeToLocalCodePage(theFileName));

  assert(theResult.size() > 0);

  const char* const tmpName = &theResult[0];

  ::MessageBox( NULL, tmpName, "3", MB_OK );

-----