You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Allen Brookes <ab...@roguewave.com> on 2004/04/02 20:11:05 UTC

Accessing group refs from XSModelGroup

Hi,

XSModelGroup has method getParticles() which returns a list of particles
within the modelGroup.  If one of the particles is a group reference
getParticles() seems to return the particles within the group.  Is there any
way to get the group reference rather than the contents of the group?

Allen

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


Re: Preserving whitespace in attributes

Posted by "C. M. Sperberg-McQueen" <cm...@acm.org>.
On Wed, 2004-04-07 at 00:23, Robert van Loenhout wrote:
> Hi,
> 
> Is there some way to preserve whitespace, including line feeds, in attribute
> values?
> They are always reduced to a single space. I know it is supposed to do this,
> but isn't there some way to work around the problems caused by it?

Just out of curiosity - what problems are those?

-C. M. Sperberg-McQueen
 World Wide Web Consortium



---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


Re: Preserving whitespace in attributes

Posted by Elliotte Rusty Harold <el...@metalab.unc.edu>.
At 11:28 AM +0200 4/8/04, Robert van Loenhout wrote:
>>  You also need to make
>>  sure that the attribute is either declared to have type CDATA in the
>>  DTD or not declared at all.
>
>Could you tell me how I can use the CDATA type in schema's? If I use
>xsd:CDATA it complains
>that it finds it in some namespace, but wants an import for it.... however
>if I do that then I get more strange
>error messages from Xerces.

Schemas are irrelevant here. You either need to have a DTD which 
declares these attributes to have type CDATA, or have no DTD at all. 
Either will work. (For experts only: yes, there is a third 
possibility. YOu coudl have a DTD which does not declare the 
attributes.) Whether or not there is a schema should have no effect 
on this.
-- 

   Elliotte Rusty Harold
   elharo@metalab.unc.edu
   Effective XML (Addison-Wesley, 2003)
   http://www.cafeconleche.org/books/effectivexml
   http://www.amazon.com/exec/obidos/ISBN%3D0321150406/ref%3Dnosim/cafeaulaitA

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


Re: Preserving whitespace in attributes

Posted by Robert van Loenhout <r....@greenvalley.nl>.
Elliotte Rusty Harold wrote:
> At 8:23 AM +0200 4/7/04, Robert van Loenhout wrote:
> > Hi,
> >
> > Is there some way to preserve whitespace, including line feeds, in
attribute
> > values?
> > They are always reduced to a single space. I know it is supposed to do
this,
> > but isn't there some way to work around the problems caused by it?
> >
>
> You can escape these with character references.

Okay, that seems the way to go, but..... does anyone maybe know how to
insert a character reference
with MSXML? Sorry for being kinda off-topic now.
This seems to be the source of the problem, because MSXML does not escape
line feeds when setting an attribute.
And if I want to add a character entity it escapes the & in the reference
(&amp;#10;)


> You also need to make
> sure that the attribute is either declared to have type CDATA in the
> DTD or not declared at all.

Could you tell me how I can use the CDATA type in schema's? If I use
xsd:CDATA it complains
that it finds it in some namespace, but wants an import for it.... however
if I do that then I get more strange
error messages from Xerces.




                                                                              
                                                                              
                                                                               
                                                                            

                
                                                                 

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


Re: Preserving whitespace in attributes

Posted by Elliotte Rusty Harold <el...@metalab.unc.edu>.
At 8:23 AM +0200 4/7/04, Robert van Loenhout wrote:
>Hi,
>
>Is there some way to preserve whitespace, including line feeds, in attribute
>values?
>They are always reduced to a single space. I know it is supposed to do this,
>but isn't there some way to work around the problems caused by it?
>

You can escape these with character references. You also need to make 
sure that the attribute is either declared to have type CDATA in the 
DTD or not declared at all.

In the words of XML co-editor Tim Bray, "we screwed up in letting 
attribute normalization into XML.  It still boggles my mind in 
retrospect that during the discussions back in 96-97,  nobody piped 
up to say 'why are you morons doing this?'  Because we probably would 
have said 'D'oh, right, lose it.'  Sigh."
-- 

   Elliotte Rusty Harold
   elharo@metalab.unc.edu
   Effective XML (Addison-Wesley, 2003)
   http://www.cafeconleche.org/books/effectivexml
   http://www.amazon.com/exec/obidos/ISBN%3D0321150406/ref%3Dnosim/cafeaulaitA

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


Re: Preserving whitespace in attributes

Posted by Phil Weighill-Smith <ph...@volantis.com>.
Don't use an attribute: use a nested element with content and ensure
that you specify whitespace preservation.

Phil :n.

On Wed, 2004-04-07 at 07:23, Robert van Loenhout wrote:

> Hi,
> 
> Is there some way to preserve whitespace, including line feeds, in attribute
> values?
> They are always reduced to a single space. I know it is supposed to do this,
> but isn't there some way to work around the problems caused by it?
> 
> Thanks for any help.

-- 
Phil Weighill-Smith <ph...@volantis.com>
Volantis Systems

Preserving whitespace in attributes

Posted by Robert van Loenhout <r....@greenvalley.nl>.
Hi,

Is there some way to preserve whitespace, including line feeds, in attribute
values?
They are always reduced to a single space. I know it is supposed to do this,
but isn't there some way to work around the problems caused by it?

Thanks for any help.



                                                                              
                                                                              
                                                                               
                                                                            

                
                                                                 

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org