Group:  General ยป microsoft.public.office.xml
Thread: Can I Specify the XMLNode.PlaceholderText Property from within XSD Scheme?

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

Can I Specify the XMLNode.PlaceholderText Property from within XSD Scheme?
"Ignoramus" <oleg.krupnov[ at ]gmail.com> 08.06.2006 07:33:30
Hi,

I wonder if there is a way to set the placeholder (default) text for an
empty xml node in Word document, in a way other than setting
XMLNode.PlaceholderText property via VBA or via Word's UI?

I want to specify the default node text in my XSD scheme, is it
possible? I tried to insert the default text inside the
<xsd:element>mytext</xsd:element> node in the schema, but it appeared
not a valid way of doing it.

Any suggestions?

Thanks

RE: Can I Specify the XMLNode.PlaceholderText Property from within XSD
Cindy Meister 25.06.2006 09:52:02
No, this isn't possible. A schema takes no actions, it's merely a
"checksheet" that an XML file is compared against to determine whether
the XML file is built correctly (whether it's valid). But it doesn't act
as a template or blueprint - the schema is not consulted when building
an XML document.

You may get this impression when inserting XML elements using the
taskpane in Word, but this is not the case. The task pane just builds a
list of elements provided by the attached schema, nothing else.

If you're re-using the same elements over and over again, you could
create a set of AutoText entries with the placeholder text already
created. Assign them to a custom toolbar, and with a single click you
should be able to insert the element - with the placeholder text.

Other than that, the object model is your best bet.

--
-- Cindy


"Ignoramus" wrote:

[Quoted Text]
> Hi,
>
> I wonder if there is a way to set the placeholder (default) text for an
> empty xml node in Word document, in a way other than setting
> XMLNode.PlaceholderText property via VBA or via Word's UI?
>
> I want to specify the default node text in my XSD scheme, is it
> possible? I tried to insert the default text inside the
> <xsd:element>mytext</xsd:element> node in the schema, but it appeared
> not a valid way of doing it.
>
> Any suggestions?
>
> Thanks
>
>
Re: Can I Specify the XMLNode.PlaceholderText Property from within XSD
"Joe Fawcett" <joefawcett[ at ]newsgroup.nospam> 01.07.2006 15:08:50
Cindy

I'm not sure it's entirely correct when you say a schema takes no actions.
If you specify a default value for an attribute in a schema this default
value will be added to the document upon validation if not present
previously.
Not much help in the OP's scenario I suspect...

--

Joe Fawcett - XML MVP


http://joe.fawcett.name

"Cindy Meister" <Cindy-M.[ at ]swissonline.ch> wrote in message
news:F88B65E5-1A55-443D-8038-C1F3AE45CDE7[ at ]microsoft.com...
[Quoted Text]
> No, this isn't possible. A schema takes no actions, it's merely a
> "checksheet" that an XML file is compared against to determine whether
> the XML file is built correctly (whether it's valid). But it doesn't act
> as a template or blueprint - the schema is not consulted when building
> an XML document.
>
> You may get this impression when inserting XML elements using the
> taskpane in Word, but this is not the case. The task pane just builds a
> list of elements provided by the attached schema, nothing else.
>
> If you're re-using the same elements over and over again, you could
> create a set of AutoText entries with the placeholder text already
> created. Assign them to a custom toolbar, and with a single click you
> should be able to insert the element - with the placeholder text.
>
> Other than that, the object model is your best bet.
>
> --
> -- Cindy
>
>
> "Ignoramus" wrote:
>
>> Hi,
>>
>> I wonder if there is a way to set the placeholder (default) text for an
>> empty xml node in Word document, in a way other than setting
>> XMLNode.PlaceholderText property via VBA or via Word's UI?
>>
>> I want to specify the default node text in my XSD scheme, is it
>> possible? I tried to insert the default text inside the
>> <xsd:element>mytext</xsd:element> node in the schema, but it appeared
>> not a valid way of doing it.
>>
>> Any suggestions?
>>
>> Thanks
>>
>>


Re: Can I Specify the XMLNode.PlaceholderText Property from within
Cindy Meister 02.07.2006 16:28:02
OK, I stand corrected :-) I was totally focussed on the actual question, and
attributes are more or less "useless" when it comes to working with XML tags
in the Word interface, so that one didn't even occur to me. Good catch :-)
--
-- Cindy


"Joe Fawcett" wrote:

[Quoted Text]
> Cindy
>
> I'm not sure it's entirely correct when you say a schema takes no actions.
> If you specify a default value for an attribute in a schema this default
> value will be added to the document upon validation if not present
> previously.
> Not much help in the OP's scenario I suspect...
>
> --
>
> Joe Fawcett - XML MVP
>
>
> http://joe.fawcett.name
>
> "Cindy Meister" <Cindy-M.[ at ]swissonline.ch> wrote in message
> news:F88B65E5-1A55-443D-8038-C1F3AE45CDE7[ at ]microsoft.com...
> > No, this isn't possible. A schema takes no actions, it's merely a
> > "checksheet" that an XML file is compared against to determine whether
> > the XML file is built correctly (whether it's valid). But it doesn't act
> > as a template or blueprint - the schema is not consulted when building
> > an XML document.
> >
> > You may get this impression when inserting XML elements using the
> > taskpane in Word, but this is not the case. The task pane just builds a
> > list of elements provided by the attached schema, nothing else.
> >
> > If you're re-using the same elements over and over again, you could
> > create a set of AutoText entries with the placeholder text already
> > created. Assign them to a custom toolbar, and with a single click you
> > should be able to insert the element - with the placeholder text.
> >
> > Other than that, the object model is your best bet.
> >
> > --
> > -- Cindy
> >
> >
> > "Ignoramus" wrote:
> >
> >> Hi,
> >>
> >> I wonder if there is a way to set the placeholder (default) text for an
> >> empty xml node in Word document, in a way other than setting
> >> XMLNode.PlaceholderText property via VBA or via Word's UI?
> >>
> >> I want to specify the default node text in my XSD scheme, is it
> >> possible? I tried to insert the default text inside the
> >> <xsd:element>mytext</xsd:element> node in the schema, but it appeared
> >> not a valid way of doing it.
> >>
> >> Any suggestions?
> >>
> >> Thanks
> >>
> >>
>
>
>

Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net