Inserting & in the xdoc results in & in the generated
html...
Likewise, & results in &

x:parse won't accept non character entities, but if you insert a character
entity (ie &) then the & prefix get's replaced...

I couldn't find a way to prevent this happening, so I hacked the following
fix in my maven.xml:
      <postGoal name="xdoc:transform">
            <ant:replace dir="target/docs" token="&amp;amp;" value="&amp;"/>
      </postGoal>

So I insert &amp; in my xdoc which gets transformed to &amp;amp; that I
then replace with &amp;
Surely there is a nicer way to skin this cat!

Cheers
Mark






"Emmanuel Venisse" <[EMAIL PROTECTED]> on 02/07/2004 12:50:10 AM

Please respond to "Maven Users List" <[EMAIL PROTECTED]>

To:    "Maven Users List" <[EMAIL PROTECTED]>
cc:

Subject:    Re: How to insert ampersand in xdoc


Try this :
&amp;amp;

Emmanuel

----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, February 06, 2004 1:37 AM
Subject: How to insert ampersand in xdoc


>
> Hey there
>
> Does anyone know how to insert an & character into an xdoc.
>
> I'm attempting to pass a parameter in a href. For example my xdoc source
> contains something like:
>      <a href="http://www.google.com.au/search?q=monkey&hl=en";>Google
Monkey
> Search</a>
>
> Inserting & directly results in the following x:parse error:
>      The reference to entity "userId" must end with the ';' delimiter.
>
> I also tried &amp; and %26.
> This ran xdoc:jelly-transform successfully but embeds &amp; or %26
instead
> of & thereby breaking the href.
>
> Appreciate any pointers or assistance....
>
> Cheers
> Mark
>
>
>
>
> This email and any attachments is intended solely for the addressee.  It
is
> confidential, may contain personal information and may be subject to
legal
> professional privilege.  Unauthorised use is strictly prohibited and may
be
> unlawful. If you have received this by mistake, confidentiality and any
> legal privilege are not waived or lost and we ask that you contact the
> author  and delete and destroy this and any other copies.   In relation
to
> any legal use you may make of  the contents of this email, you must
ensure
> that you comply with the Privacy Act (Cth) 1988 and you should note that
> the contents may be subject to copyright and therefore may not be
> reproduced, communicated or adapted without the express consent of the
> owner of the copyright.  Allianz will not be liable in connection with
any
> data corruption, interruption, delay, computer virus or unauthorised
access
> or amendment to the contents of this email.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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








This email and any attachments is intended solely for the addressee.  It is 
confidential, may contain personal information and may be subject to legal
 professional privilege.  Unauthorised use is strictly prohibited and may be unlawful. 
If you have received this by mistake, confidentiality and any
legal privilege are not waived or lost and we ask that you contact the author  and 
delete and destroy this and any other copies.   In relation to any
legal use you may make of  the contents of this email, you must ensure that you comply 
with the Privacy Act (Cth) 1988 and you should note that the
contents may be subject to copyright and therefore may not be reproduced, communicated 
or adapted without the express consent of the owner of the
copyright.  Allianz will not be liable in connection with any data corruption, 
interruption, delay, computer virus or unauthorised access or amendment
 to the contents of this email.


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

Reply via email to