473,573 Members | 2,853 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can Trang handle <mixed>?

Hello,

I am trying to convert a RELAX NG schema to DTD using Trang. I am
currently trying to add some inline elements to the schema, such as
<emph> for marking emphasised text. Here is an excerpt from the
schema:

<define name="descripti on">
<element name="descripti on">
<mixed>
<element name="emph">
<text/>
</element>
</mixed>
</element>
</define>

Trang complains:

593: error: sorry, cannot handle this kind of "mixed"

Am I botching the RELAX NG syntax there, or is this a limitation of
Trang?
--
Paul.

mailto:paulh_lo gicsquad_net (make the obvious substitutions)
Jul 20 '05 #1
2 1756
What you have written in <mixed> is the equivalent of:

<interleave>
<element name="emph">
<text/>
</element>
<text/>
</interleave>

(One instance of <emph> possibly bracketed by text.) This has no direct
translation into a DTD, and is probably not what you mean, either. You
probably intend to allow more than one instance of <emph> in the mixed
sequence, which would be written:

<mixed>
<zeroOrMore>
<element name="emph">
<text/>
</element>
</zeroOrMore>
</mixed>

Trang will translate this to the expected:

<!ELEMENT description (#PCDATA|emph)* >

Bob Foster

"Paul A. Hoadley" <pa***@grover.l ogicsquad.net> wrote in message
news:slrnbru6na .13f3.pa***@gro ver.logicsquad. net...
Hello,

I am trying to convert a RELAX NG schema to DTD using Trang. I am
currently trying to add some inline elements to the schema, such as
<emph> for marking emphasised text. Here is an excerpt from the
schema:

<define name="descripti on">
<element name="descripti on">
<mixed>
<element name="emph">
<text/>
</element>
</mixed>
</element>
</define>

Trang complains:

593: error: sorry, cannot handle this kind of "mixed"

Am I botching the RELAX NG syntax there, or is this a limitation of
Trang?
--
Paul.

mailto:paulh_lo gicsquad_net (make the obvious substitutions)

Jul 20 '05 #2
On Sun, 23 Nov 2003 21:23:54 GMT, Bob Foster <bo********@com cast.net> wrote:
This has no direct translation into a DTD, and is probably not what
you mean, either. You probably intend to allow more than one
instance of <emph> in the mixed sequence, which would be written:

<mixed>
<zeroOrMore>
<element name="emph">
<text/>
</element>
</zeroOrMore>
</mixed>


Thanks a lot, Bob. That is, indeed, what I meant. And it does, of
course, work.
--
Paul.

mailto:paulh_lo gicsquad_net (make the obvious substitutions)
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

18
4343
by: Timothy Casey | last post by:
Thanks in advance... =~= Timothy Casey South Australia worloq@iprimus.com.au Formerly: casey@smart.net.au
19
17365
by: CMAR | last post by:
I have the following markup. The problem is that the browser, e.g., IE6, inserts several lines of blank space between the <div> and the following table. Is there a way to minimize that vertical spacing? Thanks, CMA <div class="vlgray">Condition</div> <table cellpadding="0" cellspacing="0">
1
2662
by: Swami Tota Ram Shankar | last post by:
"Bob Weigel" <dontuwish@nothing.net> wrote in message > > While George Bush, is the epitome of evil, racism, and uncompassionate > > conservatism, Kerry is either deluded, very deluded, or plainly a liar. > As to bush being racist...sorry I dont' see that. You make nasty > presumptions about others which makes you no fun to read... ...
5
2380
by: Matthew Louden | last post by:
I wrote ASP.NET application that access SQL Server database. When I run the application, it yields "Login failed for user '<COMPUTER_NAME>\ASPNET'" error message. I then did the following, but still didn't work. Any ideas?? 1. In IIS console, right click the virtual directory 2. click directory security tab 3. click edit button on...
8
5352
by: Brett Robichaud | last post by:
I understand how code-behind can handle events for a page, but can I call a code-behind method from within a <script> tag in my ASP.Net page, or can I only call methods defined in other <script> sections? I can't seem to figure out the syntax for for calling code-behind directly. The method is within the class my page inherits from and is...
13
6810
by: onetitfemme | last post by:
I think browsers do it pretty much by default. How can you avoid that? It just doesn't look right/pretty for short definitions and also how can you not indent the whole <dd> so that in stead of looking like this: <code> _ _ _ term: def def def def def def ... _ _ _ _ _ _ def def def def def def ... </code>
1
2413
by: mark4asp | last post by:
<form runat="server"automatically adds <divtag to code contained within. Is there a way to stop that? Mixing block-level elements with inline-level elements messes up the HTML becasuse that is invalid for a strict implementation. <spanis in-line-level and <divis block-level. I don't want to mix up <span> and <div> I'm using an...
4
5084
by: =?Utf-8?B?U2VyZ2Vp?= | last post by:
Dear staff Can I get your assistance with \3GB (LARGEADDRESSAWARE) switch in mixed mode process built by VS 2008, please? I have a mixed mode application: C# GUI calling native C++ DLL through managed C++ wrapper. And I want to give the native C++ code access to large (>2G) addresses; but (if it’s possible) I do not want the managed code...
42
4489
by: barcaroller | last post by:
In the boost::program_options tutorial, the author included the following code: cout << "Input files are: " << vm.as< vector<string() << "\n"; Basically, he is trying to print a vector of string, in one line. I could
0
7760
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
1
7760
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8049
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6392
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5573
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3724
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2185
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1289
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1029
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.